From 0e8fd3398771da2f016d72830179507f3edda51b Mon Sep 17 00:00:00 2001 From: Samba Release Account Date: Sat, 4 May 1996 07:50:46 +0000 Subject: Initial version imported to CVS (This used to be commit 291551d80711daab7b7581720bcd9a08d6096517) --- source3/script/revert.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 source3/script/revert.sh (limited to 'source3/script/revert.sh') diff --git a/source3/script/revert.sh b/source3/script/revert.sh new file mode 100755 index 0000000000..68b47bf39d --- /dev/null +++ b/source3/script/revert.sh @@ -0,0 +1,15 @@ +#!/bin/sh +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 + fi +done + +exit 0 + -- cgit From 1c6f52cc284a75e304d10c098088c1c846c9efc8 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 10 Aug 1998 01:55:42 +0000 Subject: fixed the installation scripts for the new layout (This used to be commit 60cdb83f3f6dfd7755e46254662245a82a8ef498) --- source3/script/revert.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'source3/script/revert.sh') 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 -- cgit