summaryrefslogtreecommitdiffstats
path: root/source/script/installscripts.sh
blob: c27d41c36b5a84d4c4372096b767717f7aa66a9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/sh
# this script courtesy of James_K._Foote.PARC@xerox.com
INSTALLPERMS=$1
BINDIR=$2
SRCDIR=$3

echo Installing scripts in $BINDIR

for d in $BINDIR; do
 if [ ! -d $d ]; then
  mkdir $d
  if [ ! -d $d ]; then
    echo Failed to make directory $d
    exit 1
  fi
 fi
done

cp ${SRCDIR}smbtar $BINDIR
cp ${SRCDIR}addtosmbpass $BINDIR
echo Setting permissions on scripts
chmod $INSTALLPERMS $BINDIR/smbtar
chmod $INSTALLPERMS $BINDIR/addtosmbpass

echo Scripts installed
exit 0