From ca0e155ef015adfaf6a9c38518e8d60adcc3fdf9 Mon Sep 17 00:00:00 2001 From: Lars Müller Date: Wed, 22 Feb 2006 21:41:14 +0000 Subject: r13642: Fix install* scripts to use DESTDIR. Always pass the INSTALLPERMS and DESTDIR as first and second arg to the scripts. No longer prepend DESTDIR to the remaining args. To fix bug #3282 it is important _not_ to prepend DESTDIR to the source of the sym link pointing to smbmount. (This used to be commit c38adf71317f2c898ee10cad8068e942835199c9) --- source3/script/installmodules.sh | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'source3/script/installmodules.sh') diff --git a/source3/script/installmodules.sh b/source3/script/installmodules.sh index f7c7473338..4ea8fde327 100755 --- a/source3/script/installmodules.sh +++ b/source3/script/installmodules.sh @@ -1,17 +1,19 @@ #!/bin/sh INSTALLPERMS=$1 -BASEDIR=`echo $2 | sed 's/\/\//\//g'` -LIBDIR=`echo $3 | sed 's/\/\//\//g'` +DESTDIR=`echo $2 | sed 's/\/\//\//g'` +BASEDIR=`echo $3 | sed 's/\/\//\//g'` +LIBDIR=`echo $4 | sed 's/\/\//\//g'` +shift shift shift shift for d in $BASEDIR $LIBDIR; do -if [ ! -d $d ]; then -mkdir $d -if [ ! -d $d ]; then - echo Failed to make directory $d +if [ ! -d $DESTDIR/$d ]; then +mkdir $DESTDIR/$d +if [ ! -d $DESTDIR/$d ]; then + echo Failed to make directory $DESTDIR/$d exit 1 fi fi @@ -19,9 +21,9 @@ done for p in $*; do p2=`basename $p` - echo Installing $p as $LIBDIR/$p2 - cp -f $p $LIBDIR/ - chmod $INSTALLPERMS $LIBDIR/$p2 + echo Installing $p as $DESTDIR/$LIBDIR/$p2 + cp -f $p $DESTDIR/$LIBDIR/ + chmod $INSTALLPERMS $DESTDIR/$LIBDIR/$p2 done exit 0 -- cgit