From: Thien-Thi Nguyen Date: Thu, 22 May 2014 08:24:39 +0000 (+0200) Subject: [maint] Fix bug: Rewrite PKG-VER extraction. X-Git-Url: https://code.delx.au/gnu-emacs-elpa/commitdiff_plain/15f7732f4193e482df55e0843dbadac829f5d574 [maint] Fix bug: Rewrite PKG-VER extraction. Unfortunately, the inaugural run of this function gave bad results: . * admin/update-archive.sh (announce_new): Take PKG-VER as $1; rename local var ‘file’ to ‘pv’, ‘version’ to ‘ver’; rewrite sed script; combine into one; use ‘eval’; add sanity check. : Extract PKG-VER into var ‘pv’; use it for ‘dst’; pass it to ‘announce_new’ instead of ‘f’. --- diff --git a/admin/update-archive.sh b/admin/update-archive.sh index d7d4e931b..680298b38 100755 --- a/admin/update-archive.sh +++ b/admin/update-archive.sh @@ -49,11 +49,11 @@ signal_error () { announce_new () { if [ "yes" != "$announce" ]; then return; fi - file="$1" - version="$(echo "$file" | sed -e 's|^.*/||' -e 's/^\(.*\)-\([^-]*\)\.[^-.]*$/\2/')" - pkg="$(echo "$file" | sed -e 's|^.*/||' -e 's/^\(.*\)-\([^-]*\)\.[^-.]*$/\1/')" - send_mail "$a_email" "[GNU ELPA] $pkg version $version" <