2 #first version March 1998, Andrew Tridgell
4 SWATDIR
=`echo $1 | sed 's/\/\//\//g'`
6 BOOKDIR
=$SWATDIR/using_samba
8 echo Installing SWAT
in $SWATDIR
9 echo Installing the Samba Web Administration Tool
11 LANGS
=". `cd $SRCDIR../swat/; /bin/echo lang/??`"
12 echo Installing langs are
`cd $SRCDIR../swat/lang/; /bin/echo ??`
15 SWATLANGDIR
=$SWATDIR/$ln
16 for d
in $SWATLANGDIR $SWATLANGDIR/help $SWATLANGDIR/images \
17 $SWATLANGDIR/include
; do
21 echo Failed to
make directory
$d, does
$USER have privileges?
31 for f
in $SRCDIR..
/swat
/$ln/images
/*.gif
; do
35 FNAME
=$SWATDIR/$ln/images
/`basename $f`
37 cp $f $FNAME ||
echo Cannot
install $FNAME. Does
$USER have privileges?
43 for f
in $SRCDIR..
/swat
/$ln/help
/*.html
; do
47 FNAME
=$SWATDIR/$ln/help
/`basename $f`
49 if [ "x$BOOKDIR" = "x" ]; then
50 cat $f |
sed 's/@BOOKDIR@.*$//' > $f.tmp
52 cat $f |
sed 's/@BOOKDIR@//' > $f.tmp
55 cp $f $FNAME ||
echo Cannot
install $FNAME. Does
$USER have privileges?
60 # Install "server-side" includes
62 for f
in $SRCDIR..
/swat
/$ln/include
/*.html
; do
66 FNAME
=$SWATDIR/$ln/include
/`basename $f`
68 cp $f $FNAME ||
echo Cannot
install $FNAME. Does
$USER have privileges?
74 # Install html documentation (if html documentation tree is here)
76 if [ -d $SRCDIR..
/docs
/htmldocs
/ ]; then
78 for f
in $SRCDIR..
/docs
/htmldocs
/*.html
; do
79 FNAME
=$SWATDIR/help
/`basename $f`
81 cp $f $FNAME ||
echo Cannot
install $FNAME. Does
$USER have privileges?
85 if [ -d $SRCDIR..
/docs
/htmldocs
/images
/ ]; then
86 if [ ! -d $SWATDIR/help
/images
/ ]; then
87 mkdir
$SWATDIR/help
/images
88 if [ ! -d $SWATDIR/help
/images
/ ]; then
89 echo Failed to
make directory
$SWATDIR/help
/images
, does
$USER have privileges?
93 for f
in $SRCDIR..
/docs
/htmldocs
/images
/*.png
; do
94 FNAME
=$SWATDIR/help
/images
/`basename $f`
96 cp $f $FNAME ||
echo Cannot
install $FNAME. Does
$USER have privileges?
102 # Install Using Samba book (but only if it is there)
104 if [ "x$BOOKDIR" != "x" -a -f $SRCDIR..
/docs
/htmldocs
/using_samba
/toc.html
]; then
108 for d
in $BOOKDIR $BOOKDIR/figs
; do
112 echo Failed to
make directory
$d, does
$USER have privileges?
120 for f
in $SRCDIR..
/docs
/htmldocs
/using_samba
/*.html
; do
121 FNAME
=$BOOKDIR/`basename $f`
123 cp $f $FNAME ||
echo Cannot
install $FNAME. Does
$USER have privileges?
127 for f
in $SRCDIR..
/docs
/htmldocs
/using_samba
/*.gif
; do
128 FNAME
=$BOOKDIR/`basename $f`
130 cp $f $FNAME ||
echo Cannot
install $FNAME. Does
$USER have privileges?
136 for f
in $SRCDIR..
/docs
/htmldocs
/using_samba
/figs
/*.gif
; do
137 FNAME
=$BOOKDIR/figs
/`basename $f`
139 cp $f $FNAME ||
echo Cannot
install $FNAME. Does
$USER have privileges?
146 ======================================================================
147 The SWAT files have been installed. Remember to read the swat/README
148 for information on enabling and using SWAT
149 ======================================================================