WHATSNEW: Start WHATSNEW for 3.4.1.
[Samba.git] / source3 / script / installscripts.sh
blob81608c3682c2beff25fe7059f8248d2eca28c509
1 #!/bin/sh
2 # this script courtesy of James_K._Foote.PARC@xerox.com
3 # 5 July 96 Dan.Shearer@UniSA.Edu.Au Don't hardcode script names, get from Make
5 INSTALLPERMS=$1
6 BINDIR=`echo $2 | sed 's/\/\//\//g'`
8 shift
9 shift
11 echo Installing scripts in $BINDIR
13 for d in $BINDIR; do
14 if [ ! -d $d ]; then
15 mkdir $d
16 if [ ! -d $d ]; then
17 echo Failed to make directory $d
18 echo Have you run installbin first?
19 exit 1
22 done
24 for p in $*; do
25 p2=`basename $p`
26 echo Installing $BINDIR/$p2
27 if [ -f $BINDIR/$p2 ]; then
28 rm -f $BINDIR/$p2.old
29 mv $BINDIR/$p2 $BINDIR/$p2.old
31 cp $p $BINDIR/
32 chmod $INSTALLPERMS $BINDIR/$p2
33 if [ ! -f $BINDIR/$p2 ]; then
34 echo Cannot copy $p2... does $USER have privileges?
36 done
38 cat << EOF
39 ======================================================================
40 The scripts have been installed. You may uninstall them using
41 the command "make uninstallscripts" or "make install" to install binaries,
42 man pages and shell scripts. You may recover the previous version (if any
43 by "make revert".
44 ======================================================================
45 EOF
47 exit 0