patch to fix NetServerEnum with multiple workgroup lists kindly supplied.
[Samba.git] / source / script / installbin.sh
blob633e6cb5bb2d68d0622cf1248f5040508512d04a
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"
38 ======================================================================
39 EOF
41 exit 0