source: branches/samba-3.5.x/source3/script/installscripts.sh@ 717

Last change on this file since 717 was 414, checked in by Herwig Bauernfeind, 15 years ago

Samba 3.5.0: Initial import

File size: 1.1 KB
Line 
1#!/bin/sh
2# this script courtesy of James_K._Foote.PARC@xerox.com
3# 5 July 96 Dan.Shearer@UniSA.Edu.Au Don't hardcode script names, get from Make
4
5INSTALLPERMS=$1
6BINDIR=`echo $2 | sed 's/\/\//\//g'`
7
8shift
9shift
10
11echo Installing scripts in $BINDIR
12
13for d in $BINDIR; do
14 if [ ! -d $d ]; then
15 mkdir $d
16 if [ ! -d $d ]; then
17 echo Failed to make directory $d
18 echo Have you run installbin first?
19 exit 1
20 fi
21 fi
22done
23
24for p in $*; do
25 p2=`basename $p`
26 echo Installing $BINDIR/$p2
27 if [ -f $BINDIR/$p2 ]; then
28 rm -f $BINDIR/$p2.old
29 mv $BINDIR/$p2 $BINDIR/$p2.old
30 fi
31 cp $p $BINDIR/
32 chmod $INSTALLPERMS $BINDIR/$p2
33 if [ ! -f $BINDIR/$p2 ]; then
34 echo Cannot copy $p2... does $USER have privileges?
35 fi
36done
37
38cat << EOF
39======================================================================
40The scripts have been installed. You may uninstall them using
41the command "make uninstallscripts" or "make install" to install binaries,
42man pages and shell scripts. You may recover the previous version (if any
43by "make revert".
44======================================================================
45EOF
46
47exit 0
Note: See TracBrowser for help on using the repository browser.