aboutsummaryrefslogtreecommitdiff
path: root/bin/pkgundo
diff options
context:
space:
mode:
Diffstat (limited to 'bin/pkgundo')
-rwxr-xr-xbin/pkgundo12
1 files changed, 12 insertions, 0 deletions
diff --git a/bin/pkgundo b/bin/pkgundo
new file mode 100755
index 0000000..9f3ad25
--- /dev/null
+++ b/bin/pkgundo
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+# pkgundo -- restore original files
+
+[ $# -eq 0 ] && { echo "usage: ${0##*/} orig ..." 2>&1; exit 1; }
+
+n=
+for orig in "$@"; do
+ : $((n++))
+ mv "$orig" "${orig%.orig}"
+done
+echo "${0##*/}: moved $n files" 2>&1