home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1998 July & August / Pcwk78a98.iso / Wtestowe / Clico / UNIX / SAMBA / SOURCE / SAMBA.TAR / samba-1.9.17 / source / revert.sh < prev    next >
Linux/UNIX/POSIX Shell Script  |  1996-05-04  |  228b  |  16 lines

  1. #!/bin/sh
  2. BINDIR=$1
  3. shift
  4.  
  5. for p in $*; do
  6.  if [ -f $BINDIR/$p.old ]; then
  7.    echo Restoring $BINDIR/$p.old as $BINDIR/$p
  8.    mv $BINDIR/$p $BINDIR/$p.new
  9.    mv $BINDIR/$p.old $BINDIR/$p
  10.    rm -f $BINDIR/$p.new
  11.  fi
  12. done
  13.  
  14. exit 0
  15.  
  16.