install jpeg 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 the Samba Web Admisistration Tool
8
9 for d in $SWATDIR $SWATDIR/help $SWATDIR/images; do
10 if [ ! -d $d ]; then
11   mkdir $d
12 if [ ! -d $d ]; then
13   echo Failed to make directory $d, does $USER have privileges?
14   exit 1
15 fi
16 fi
17 done
18
19 for f in $SRCDIR../swat/images/*.gif; do
20       FNAME=$SWATDIR/images/`basename $f`
21       echo $FNAME
22       cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges?
23       chmod 0644 $FNAME
24 done
25
26 for f in $SRCDIR../swat/images/*.jpg; do
27       FNAME=$SWATDIR/images/`basename $f`
28       echo $FNAME
29       cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges?
30       chmod 0644 $FNAME
31 done
32
33 for f in $SRCDIR../swat/help/*.html; do
34       FNAME=$SWATDIR/help/`basename $f`
35       echo $FNAME
36       cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges?
37       chmod 0644 $FNAME
38 done
39
40 cat << EOF
41 ======================================================================
42 The SWAT files have been installed. Remember to read the swat/README
43 for information on enabling and using SWAT
44 ======================================================================
45 EOF
46
47 exit 0
48