1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-11 17:58:16 +03:00
samba-mirror/source3/script/installswat.sh
Andrew Tridgell 69bb6f6f5f install jpeg files
(This used to be commit 02cb3801d772cc056df3afb7028d9bd74c8553be)
1998-03-15 00:03:38 +00:00

49 lines
1.2 KiB
Bash
Executable File

#!/bin/sh
#fist version March 1998, Andrew Tridgell
SWATDIR=$1
SRCDIR=$2
echo Installing the Samba Web Admisistration Tool
for d in $SWATDIR $SWATDIR/help $SWATDIR/images; do
if [ ! -d $d ]; then
mkdir $d
if [ ! -d $d ]; then
echo Failed to make directory $d, does $USER have privileges?
exit 1
fi
fi
done
for f in $SRCDIR../swat/images/*.gif; do
FNAME=$SWATDIR/images/`basename $f`
echo $FNAME
cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges?
chmod 0644 $FNAME
done
for f in $SRCDIR../swat/images/*.jpg; do
FNAME=$SWATDIR/images/`basename $f`
echo $FNAME
cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges?
chmod 0644 $FNAME
done
for f in $SRCDIR../swat/help/*.html; do
FNAME=$SWATDIR/help/`basename $f`
echo $FNAME
cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges?
chmod 0644 $FNAME
done
cat << EOF
======================================================================
The SWAT files have been installed. Remember to read the swat/README
for information on enabling and using SWAT
======================================================================
EOF
exit 0