From 15f7732f4193e482df55e0843dbadac829f5d574 Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Thu, 22 May 2014 10:24:39 +0200 Subject: [PATCH] [maint] Fix bug: Rewrite PKG-VER extraction. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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’. --- admin/update-archive.sh | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) 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" <