diff options
Diffstat (limited to 'source3/script/installscripts.sh')
-rwxr-xr-x | source3/script/installscripts.sh | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/source3/script/installscripts.sh b/source3/script/installscripts.sh index 1a230c8cfa2..6d55317e9e1 100755 --- a/source3/script/installscripts.sh +++ b/source3/script/installscripts.sh @@ -22,13 +22,16 @@ for d in $BINDIR; do done for p in $*; do - echo Installing $BINDIR/$p - cp $p $BINDIR/$p - if [ ! -f $BINDIR/$p ]; then - echo Cannot copy $p... does $USER have privileges? + p2=`basename $p` + echo Installing $BINDIR/$p2 + if [ -f $BINDIR/$p2 ]; then + mv $BINDIR/$p2 $BINDIR/$p2.old + fi + cp $p $BINDIR/ + chmod $INSTALLPERMS $BINDIR/$p2 + if [ ! -f $BINDIR/$p2 ]; then + echo Cannot copy $p2... does $USER have privileges? fi - echo Setting permissions on $BINDIR/$p - chmod $INSTALLPERMS $BINDIR/$p done cat << EOF |