summaryrefslogtreecommitdiff
path: root/source3/script/revert.sh
diff options
context:
space:
mode:
Diffstat (limited to 'source3/script/revert.sh')
-rwxr-xr-xsource3/script/revert.sh13
1 files changed, 8 insertions, 5 deletions
diff --git a/source3/script/revert.sh b/source3/script/revert.sh
index 68b47bf39d..8df5fd2fbd 100755
--- a/source3/script/revert.sh
+++ b/source3/script/revert.sh
@@ -3,11 +3,14 @@ BINDIR=$1
shift
for p in $*; do
- if [ -f $BINDIR/$p.old ]; then
- echo Restoring $BINDIR/$p.old as $BINDIR/$p
- mv $BINDIR/$p $BINDIR/$p.new
- mv $BINDIR/$p.old $BINDIR/$p
- rm -f $BINDIR/$p.new
+ 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