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
$SWATLANGDIR/js
; do
21 echo Failed to
make directory
$d, does
$USER have privileges?
31 for f
in $SRCDIR..
/swat
/$ln/images
/*.png
; 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
/*; do
66 FNAME
=$SWATDIR/$ln/include
/`basename $f`
68 cp $f $FNAME ||
echo Cannot
install $FNAME. Does
$USER have privileges?
74 for f
in $SRCDIR..
/swat
/$ln/js
/*.js
; do
78 FNAME
=$SWATDIR/$ln/js
/`basename $f`
80 cp $f $FNAME ||
echo Cannot
install $FNAME. Does
$USER have privileges?
86 # Install html documentation (if html documentation tree is here)
88 if [ -d $SRCDIR..
/docs
/htmldocs
/ ]; then
90 for dir
in htmldocs
/manpages htmldocs
/Samba3-ByExample htmldocs
/Samba3-Developers-Guide htmldocs
/Samba3-HOWTO
93 if [ ! -d $SRCDIR..
/docs
/$dir ]; then
97 INSTALLDIR
=$SWATDIR/help
/`echo $dir | sed 's/htmldocs\///g'`
98 if [ ! -d $INSTALLDIR ]; then
102 for f
in $SRCDIR..
/docs
/$dir/*.html
; do
103 FNAME
=$INSTALLDIR/`basename $f`
105 cp $f $FNAME ||
echo Cannot
install $FNAME. Does
$USER have privileges?
109 if [ -d $SRCDIR..
/docs
/$dir/images
/ ]; then
110 if [ ! -d $INSTALLDIR/images
/ ]; then
111 mkdir
$INSTALLDIR/images
112 if [ ! -d $INSTALLDIR/images
/ ]; then
113 echo Failed to
make directory
$SWATDIR/help
/images
, does
$USER have privileges?
117 for f
in $SRCDIR..
/docs
/$dir/images
/*.png
; do
118 FNAME
=$INSTALLDIR/images
/`basename $f`
120 cp $f $FNAME ||
echo Cannot
install $FNAME. Does
$USER have privileges?
127 # Install Using Samba book (but only if it is there)
129 if [ "x$BOOKDIR" != "x" -a -f $SRCDIR..
/docs
/htmldocs
/using_samba
/toc.html
]; then
133 for d
in $BOOKDIR $BOOKDIR/figs
; do
137 echo Failed to
make directory
$d, does
$USER have privileges?
145 for f
in $SRCDIR..
/docs
/htmldocs
/using_samba
/*.html
; do
146 FNAME
=$BOOKDIR/`basename $f`
148 cp $f $FNAME ||
echo Cannot
install $FNAME. Does
$USER have privileges?
152 for f
in $SRCDIR..
/docs
/htmldocs
/using_samba
/*.gif
; do
153 FNAME
=$BOOKDIR/`basename $f`
155 cp $f $FNAME ||
echo Cannot
install $FNAME. Does
$USER have privileges?
161 for f
in $SRCDIR..
/docs
/htmldocs
/using_samba
/figs
/*.gif
; do
162 FNAME
=$BOOKDIR/figs
/`basename $f`
164 cp $f $FNAME ||
echo Cannot
install $FNAME. Does
$USER have privileges?
171 ======================================================================
172 The SWAT files have been installed. Remember to read the documentation
173 for information on enabling and using SWAT
174 ======================================================================