Create symlinks for modules that register multiple functions (fixes bug #91 )
[Samba/gebeck_regimport.git] / source / script / installmodules.sh
blobc80da763688fdad5e705ed2b019dab3eea5f8752
1 #!/bin/sh
3 INSTALLPERMS=$1
4 BASEDIR=$2
5 LIBDIR=$3
6 shift
7 shift
8 shift
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
18 done
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
27 exit 0