Arrrgh, one more fix. Restores of long file names were
[Samba/gebeck_regimport.git] / source3 / script / installbin.sh
blobb976a3e5ea8440d57e3dc03a69341d8a37fc5676
1 #!/bin/sh
2 INSTALLPERMS=$1
3 BASEDIR=$2
4 BINDIR=$3
5 LIBDIR=$4
6 VARDIR=$5
7 shift
8 shift
9 shift
10 shift
11 shift
13 for d in $BASEDIR $BINDIR $LIBDIR $VARDIR; do
14 if [ ! -d $d ]; then
15 mkdir $d
16 if [ ! -d $d ]; then
17 echo Failed to make directory $d
18 exit 1
21 done
24 for p in $*; do
25 echo Installing $p as $BINDIR/$p
26 if [ -f $BINDIR/$p ]; then
27 mv $BINDIR/$p $BINDIR/$p.old
29 cp $p $BINDIR/$p
30 chmod $INSTALLPERMS $BINDIR/$p
31 done
34 cat << EOF
35 ======================================================================
36 The binaries are installed. You may restore the old binaries (if there
37 were any) using the command "make revert". You may uninstall the binaries
38 using the command "make uninstallbin" or "make uninstall" to uninstall
39 binaries, man pages and shell scripts.
40 ======================================================================
41 EOF
43 exit 0