[26642] in Source-Commits

home help back first fref pref prev next nref lref last post

/svn/athena r25676 - trunk/debathena/scripts

daemon@ATHENA.MIT.EDU (Jonathan D Reed)
Tue Jul 31 15:23:38 2012

Date: Tue, 31 Jul 2012 15:23:35 -0400
From: Jonathan D Reed <jdreed@MIT.EDU>
Message-Id: <201207311923.q6VJNZpn005790@drugstore.mit.edu>
To: source-commits@MIT.EDU
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Author: jdreed
Date: 2012-07-31 15:23:35 -0400 (Tue, 31 Jul 2012)
New Revision: 25676

Modified:
   trunk/debathena/scripts/damove
Log:
Support moving multiple packages (Trac: #688)

Modified: trunk/debathena/scripts/damove
===================================================================
--- trunk/debathena/scripts/damove	2012-07-31 19:12:21 UTC (rev 25675)
+++ trunk/debathena/scripts/damove	2012-07-31 19:23:35 UTC (rev 25676)
@@ -20,7 +20,9 @@
 new_suffix="$1"; shift
 old_suffix="$1"; shift
 
-dacopy "$new_suffix" "$old_suffix" "$@"
-if [ "$new_suffix" != "$old_suffix" ]; then
-    daremove "$old_suffix" "$@"
-fi
+for pkg in "$@"; do
+    dacopy "$new_suffix" "$old_suffix" "$pkg"
+    if [ "$new_suffix" != "$old_suffix" ]; then
+	daremove "$old_suffix" "$pkg"
+    fi
+done


home help back first fref pref prev next nref lref last post