merge from HEAD
[Samba.git] / source / script / installswat.sh
blobab760cb545b5858246e7dcefe6b6bd407ef94547
1 #!/bin/sh
2 #fist version March 1998, Andrew Tridgell
4 SWATDIR=$1
5 SRCDIR=$2/
7 echo Installing SWAT in $SWATDIR
9 echo Installing the Samba Web Administration Tool
11 for d in $SWATDIR $SWATDIR/help $SWATDIR/images $SWATDIR/include; do
12 if [ ! -d $d ]; then
13 mkdir $d
14 if [ ! -d $d ]; then
15 echo Failed to make directory $d, does $USER have privileges?
16 exit 1
19 done
21 for f in $SRCDIR../swat/images/*.gif; do
22 FNAME=$SWATDIR/images/`basename $f`
23 echo $FNAME
24 cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges?
25 chmod 0644 $FNAME
26 done
28 for f in $SRCDIR../swat/help/*.html; do
29 FNAME=$SWATDIR/help/`basename $f`
30 echo $FNAME
31 cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges?
32 chmod 0644 $FNAME
33 done
35 for f in $SRCDIR../docs/htmldocs/*.html; do
36 FNAME=$SWATDIR/help/`basename $f`
37 echo $FNAME
38 cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges?
39 chmod 0644 $FNAME
40 done
42 for f in $SRCDIR../swat/include/*.html; do
43 FNAME=$SWATDIR/include/`basename $f`
44 echo $FNAME
45 cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges?
46 chmod 0644 $FNAME
47 done
49 cat << EOF
50 ======================================================================
51 The SWAT files have been installed. Remember to read the swat/README
52 for information on enabling and using SWAT
53 ======================================================================
54 EOF
56 exit 0