summaryrefslogtreecommitdiffstats
path: root/source/script/revert.sh
diff options
context:
space:
mode:
Diffstat (limited to 'source/script/revert.sh')
-rwxr-xr-xsource/script/revert.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/source/script/revert.sh b/source/script/revert.sh
new file mode 100755
index 00000000000..8df5fd2fbde
--- /dev/null
+++ b/source/script/revert.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+BINDIR=$1
+shift
+
+for p in $*; do
+ p2=`basename $p`
+ if [ -f $BINDIR/$p2.old ]; then
+ echo Restoring $BINDIR/$p2.old
+ mv $BINDIR/$p2 $BINDIR/$p2.new
+ mv $BINDIR/$p2.old $BINDIR/$p2
+ rm -f $BINDIR/$p2.new
+ else
+ echo Not restoring $p
+ fi
+done
+
+exit 0
+