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