The following commit has been merged in the master branch:
commit f525630d09a4a4874d0be498fb4c90fb674492f6
Author: Jakub Wilk <[email protected]>
Date:   Tue Feb 21 21:34:32 2012 +0000

    deb-reversion: Simplify option parsing, and thus argument quoting

diff --git a/debian/changelog b/debian/changelog
index ca21b48..4775682 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,14 @@
 devscripts (2.11.5) UNRELEASED; urgency=low
 
+  [ Adam D. Barratt ]
   * deb-reversion: Re-fix handling of multi-word hooks.  (Closes: #660782).
     This was originally fixed in 2.9.14 but accidentally broken again in
     2.9.26.
 
+  [ Jakub Wilk ]
+  * deb-reversion: Simplify option parsing, also allowing simpler quoting of
+    arguments.
+
  -- Adam D. Barratt <[email protected]>  Wed, 15 Feb 2012 19:40:58 +0000
 
 devscripts (2.11.4) unstable; urgency=high
diff --git a/scripts/deb-reversion.sh b/scripts/deb-reversion.sh
index 47b0d0e..a31d175 100755
--- a/scripts/deb-reversion.sh
+++ b/scripts/deb-reversion.sh
@@ -71,10 +71,10 @@ DEB=
 DCH_OPTIONS=
 for opt in "$@"; do
   case "${OPT_STATE:-}" in
-    SET_OLD_VERSION) eval OLD_VERSION="$opt";;
-    SET_NEW_VERSION) eval NEW_VERSION="$opt";;
-    SET_STRING) eval VERSTR="$opt";;
-    SET_HOOK) eval HOOK="$opt";;
+    SET_OLD_VERSION) OLD_VERSION="$opt";;
+    SET_NEW_VERSION) NEW_VERSION="$opt";;
+    SET_STRING) VERSTR="$opt";;
+    SET_HOOK) HOOK="$opt";;
     *) :;;
   esac
   [ -n "${OPT_STATE:-}" ] && unset OPT_STATE && continue
@@ -91,7 +91,6 @@ for opt in "$@"; do
     -V|--version) versioninfo; exit 0;;
     --) :;;
     *)
-      eval opt=$opt
       if [ -f "$opt" ]; then
         if [ -n "$DEB" ]; then
           err "multiple .deb files specified: ${DEB##*/} and $opt"
@@ -195,7 +194,7 @@ repack_file()
 [ -z "${NEW_VERSION:-}" ] && NEW_VERSION="$(bump_version $OLD_VERSION)"
 
 if [ $CALCULATE -eq 1 ]; then
-  eval echo $NEW_VERSION
+  echo $NEW_VERSION
   exit 0
 fi
 

-- 
Git repository for devscripts


-- 
To unsubscribe, send mail to [email protected].

Reply via email to