source: branches/samba-3.0/source/script/installbin.sh@ 387

Last change on this file since 387 was 1, checked in by Paul Smedley, 18 years ago

Initial code import

File size: 1.2 KB
Line 
1#!/bin/sh
2
3INSTALLPERMS=$1
4DESTDIR=$2
5prefix=`echo $3 | sed 's/\/\//\//g'`
6BINDIR=`echo $4 | sed 's/\/\//\//g'`
7SBINDIR=${exec_prefix}/sbin
8shift
9shift
10shift
11shift
12
13for p in $*; do
14 p2=`basename $p`
15 echo "Installing $p as $DESTDIR/$BINDIR/$p2 "
16 if [ -f $DESTDIR/$BINDIR/$p2 ]; then
17 rm -f $DESTDIR/$BINDIR/$p2.old
18 mv $DESTDIR/$BINDIR/$p2 $DESTDIR/$BINDIR/$p2.old
19 fi
20 cp $p $DESTDIR/$BINDIR/
21 chmod $INSTALLPERMS $DESTDIR/$BINDIR/$p2
22
23 # this is a special case, mount needs this in a specific location
24 if [ $p2 = smbmount ]; then
25 if [ ! -d $DESTDIR/${SBINDIR} ]; then
26 mkdir $DESTDIR/${SBINDIR}
27 fi
28 echo "Creating sym link $DESTDIR/${SBINDIR}/mount.smbfs to $BINDIR/$p2 "
29 ln -sf $BINDIR/$p2 $DESTDIR/${SBINDIR}/mount.smbfs
30 fi
31done
32
33
34cat << EOF
35======================================================================
36The binaries are installed. You may restore the old binaries (if there
37were any) using the command "make revert". You may uninstall the binaries
38using the command "make uninstallbin" or "make uninstall" to uninstall
39binaries, man pages and shell scripts.
40======================================================================
41EOF
42
43exit 0
Note: See TracBrowser for help on using the repository browser.