summaryrefslogtreecommitdiffstats
path: root/source3/script/revert.sh
blob: 8df5fd2fbdea503a499254efbbe51c9fbeacea16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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