Merge commit 'release-4-0-0alpha1' into v4-0-test
[kai/samba.git] / source / script / installmodules.sh
1 #!/bin/sh
2
3 INSTALLPERMS=$1
4 LIBDIR=$2
5 shift
6 shift
7 shift
8
9 if [ ! -d $LIBDIR ]; then
10 mkdir $LIBDIR
11 if [ ! -d $LIBDIR ]; then
12   echo Failed to make directory $LIBDIR
13   exit 1
14 fi
15 fi
16
17 for p in $*; do
18  p2=`basename $p`
19  echo Installing $p as $LIBDIR/$p2
20  cp -f $p $LIBDIR/
21  chmod $INSTALLPERMS $LIBDIR/$p2
22 done
23
24
25 cat << EOF
26 ======================================================================
27 The modules are installed.  You may uninstall the modules using the 
28 command "make uninstallmodules" or "make uninstall" to uninstall
29 binaries, man pages, shell scripts and modules.
30 ======================================================================
31 EOF
32
33 exit 0