summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsource/script/installbin.sh15
1 files changed, 10 insertions, 5 deletions
diff --git a/source/script/installbin.sh b/source/script/installbin.sh
index c2f34082dd9..f9fd5298c09 100755
--- a/source/script/installbin.sh
+++ b/source/script/installbin.sh
@@ -1,10 +1,12 @@
#!/bin/sh
INSTALLPERMS=$1
-BASEDIR=$2
-BINDIR=$3
-LIBDIR=$4
-VARDIR=$5
+DESTDIR=$2
+BASEDIR=`echo $3 | sed 's/\/\//\//g'`
+BINDIR=`echo $4 | sed 's/\/\//\//g'`
+LIBDIR=`echo $5 | sed 's/\/\//\//g'`
+VARDIR=`echo $6 | sed 's/\/\//\//g'`
+shift
shift
shift
shift
@@ -23,7 +25,10 @@ for p in $*; do
# this is a special case, mount needs this in a specific location
if [ $p2 = smbmount ]; then
- ln -sf $BINDIR/$p2 /sbin/mount.smbfs
+ if [ ! -d $DESTDIR/sbin ]; then
+ mkdir $DESTDIR/sbin
+ fi
+ ln -sf $BINDIR/$p2 $DESTDIR/sbin/mount.smbfs
fi
done