~zulcss/samba/server-dailies-3.4

« back to all changes in this revision

Viewing changes to source3/script/revert.sh

  • Committer: Chuck Short
  • Date: 2010-09-28 20:38:39 UTC
  • Revision ID: zulcss@ubuntu.com-20100928203839-pgjulytsi9ue63x1
Initial version

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
BINDIR=$1
 
3
shift
 
4
 
 
5
for p in $*; do
 
6
 p2=`basename $p`
 
7
 if [ -f $BINDIR/$p2.old ]; then
 
8
   echo Restoring $BINDIR/$p2.old
 
9
   mv $BINDIR/$p2 $BINDIR/$p2.new
 
10
   mv $BINDIR/$p2.old $BINDIR/$p2
 
11
   rm -f $BINDIR/$p2.new
 
12
 else
 
13
   echo Not restoring $p
 
14
 fi
 
15
done
 
16
 
 
17
exit 0
 
18