need to istall new files
[ira/wip.git] / source3 / script / installswat.sh
1 #!/bin/sh
2 #fist version March 1998, Andrew Tridgell
3
4 SWATDIR=$1
5 SRCDIR=$2/
6
7 echo Installing SWAT in $SWATDIR
8
9 echo Installing the Samba Web Admisistration Tool
10
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
17 fi
18 fi
19 done
20
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
27
28 for f in $SRCDIR../swat/images/*.jpg; do
29       FNAME=$SWATDIR/images/`basename $f`
30       echo $FNAME
31       cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges?
32       chmod 0644 $FNAME
33 done
34
35 for f in $SRCDIR../swat/help/*.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
41
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
48
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
55
56 exit 0
57