diff options
author | Andrew Tridgell <tridge@samba.org> | 1998-08-10 01:55:42 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1998-08-10 01:55:42 +0000 |
commit | 1c6f52cc284a75e304d10c098088c1c846c9efc8 (patch) | |
tree | 90260b384ff8eaf0150e920a14003ab48a9ae851 /source3/script | |
parent | 65a29b0ca56a78148b415fd817af245afc2bb0b9 (diff) | |
download | samba-1c6f52cc284a75e304d10c098088c1c846c9efc8.tar.gz samba-1c6f52cc284a75e304d10c098088c1c846c9efc8.tar.bz2 samba-1c6f52cc284a75e304d10c098088c1c846c9efc8.zip |
fixed the installation scripts for the new layout
(This used to be commit 60cdb83f3f6dfd7755e46254662245a82a8ef498)
Diffstat (limited to 'source3/script')
-rwxr-xr-x | source3/script/installbin.sh | 12 | ||||
-rwxr-xr-x | source3/script/installcp.sh | 4 | ||||
-rwxr-xr-x | source3/script/installman.sh | 1 | ||||
-rwxr-xr-x | source3/script/installscripts.sh | 15 | ||||
-rwxr-xr-x | source3/script/revert.sh | 13 | ||||
-rwxr-xr-x | source3/script/uninstallbin.sh | 13 | ||||
-rwxr-xr-x | source3/script/uninstallman.sh | 4 | ||||
-rwxr-xr-x | source3/script/uninstallscripts.sh | 13 |
8 files changed, 40 insertions, 35 deletions
diff --git a/source3/script/installbin.sh b/source3/script/installbin.sh index b976a3e5ea..22771ce5a0 100755 --- a/source3/script/installbin.sh +++ b/source3/script/installbin.sh @@ -1,4 +1,5 @@ #!/bin/sh + INSTALLPERMS=$1 BASEDIR=$2 BINDIR=$3 @@ -22,12 +23,13 @@ done for p in $*; do - echo Installing $p as $BINDIR/$p - if [ -f $BINDIR/$p ]; then - mv $BINDIR/$p $BINDIR/$p.old + p2=`basename $p` + echo Installing $p as $BINDIR/$p2 + if [ -f $BINDIR/$p2 ]; then + mv $BINDIR/$p2 $BINDIR/$p2.old fi - cp $p $BINDIR/$p - chmod $INSTALLPERMS $BINDIR/$p + cp $p $BINDIR/ + chmod $INSTALLPERMS $BINDIR/$p2 done diff --git a/source3/script/installcp.sh b/source3/script/installcp.sh index c4f917113b..d1bc7f6291 100755 --- a/source3/script/installcp.sh +++ b/source3/script/installcp.sh @@ -19,8 +19,8 @@ fi done for p in $*; do - echo Creating codepage file $CODEPAGEDIR/codepage.$p from codepage_def.$p - $BINDIR/make_smbcodepage c $p codepage_def.$p $CODEPAGEDIR/codepage.$p + echo Creating codepage file $CODEPAGEDIR/codepage.$p + $BINDIR/make_smbcodepage c $p codepages/codepage_def.$p $CODEPAGEDIR/codepage.$p done diff --git a/source3/script/installman.sh b/source3/script/installman.sh index 95611dcc22..12a63e26c0 100755 --- a/source3/script/installman.sh +++ b/source3/script/installman.sh @@ -20,6 +20,7 @@ for sect in 1 5 7 8 ; do for m in $MANDIR/man$sect ; do for s in $SRCDIR../docs/*$sect; do FNAME=$m/`basename $s` + echo Installing $FNAME cp $s $m || echo Cannot create $FNAME... does $USER have privileges? chmod 0644 $FNAME done diff --git a/source3/script/installscripts.sh b/source3/script/installscripts.sh index 1a230c8cfa..6d55317e9e 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 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 diff --git a/source3/script/uninstallbin.sh b/source3/script/uninstallbin.sh index fab36804a2..53775f8946 100755 --- a/source3/script/uninstallbin.sh +++ b/source3/script/uninstallbin.sh @@ -19,13 +19,12 @@ if [ ! -d $BINDIR ]; then fi for p in $*; do - if [ ! -f $BINDIR/$p ]; then - echo $BINDIR/$p does not exist! - else - echo Removing $BINDIR/$p - rm -f $BINDIR/$p - if [ -f $BINDIR/$p ]; then - echo Cannot remove $BINDIR/$p... does $USER have privileges? + p2=`basename $p` + if [ -f $BINDIR/$p2 ]; then + echo Removing $BINDIR/$p2 + rm -f $BINDIR/$p2 + if [ -f $BINDIR/$p2 ]; then + echo Cannot remove $BINDIR/$p2 ... does $USER have privileges? fi fi done diff --git a/source3/script/uninstallman.sh b/source3/script/uninstallman.sh index b4d4bfc1f9..b6d2524ec7 100755 --- a/source3/script/uninstallman.sh +++ b/source3/script/uninstallman.sh @@ -8,14 +8,12 @@ echo Uninstalling man pages from $MANDIR for sect in 1 5 7 8 ; do for m in $MANDIR/man$sect ; do - for s in $SRCDIR../docs/*$sect; do + for s in $SRCDIR/../docs/*$sect; do FNAME=$m/`basename $s` if test -f $FNAME; then echo Deleting $FNAME rm -f $FNAME test -f $FNAME && echo Cannot remove $FNAME... does $USER have privileges? - else - echo $FNAME does not exist! Check defines in the Makefile fi done done diff --git a/source3/script/uninstallscripts.sh b/source3/script/uninstallscripts.sh index ae907546f2..13104acedd 100755 --- a/source3/script/uninstallscripts.sh +++ b/source3/script/uninstallscripts.sh @@ -14,13 +14,12 @@ if [ ! -d $BINDIR ]; then fi for p in $*; do - if [ ! -f $BINDIR/$p ]; then - echo $BINDIR/$p does not exist! - else - echo Removing $BINDIR/$p - rm -f $BINDIR/$p - if [ -f $BINDIR/$p ]; then - echo Cannot remove $BINDIR/$p... does $USER have privileges? + p2=`basename $p` + if [ -f $BINDIR/$p2 ]; then + echo Removing $BINDIR/$p2 + rm -f $BINDIR/$p2 + if [ -f $BINDIR/$p2 ]; then + echo Cannot remove $BINDIR/$p2 ... does $USER have privileges? fi fi done |