summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-06-26 04:30:48 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:18:50 -0500
commit0add9cb6fc609751afdeea43f710920832311711 (patch)
treef8c7fe7c62bde86b712e420f2fe50bb7709bce9f
parentde85d70a4aa782bc9a693e72d36897a0b22e521a (diff)
downloadsamba-0add9cb6fc609751afdeea43f710920832311711.tar.gz
samba-0add9cb6fc609751afdeea43f710920832311711.tar.bz2
samba-0add9cb6fc609751afdeea43f710920832311711.zip
r7920: another attempt at making installswat.sh portable
(This used to be commit 46416ebd9d61038eff96ede77ca0823ea43923a6)
-rw-r--r--source4/script/installswat.sh30
1 files changed, 13 insertions, 17 deletions
diff --git a/source4/script/installswat.sh b/source4/script/installswat.sh
index ce0e962bab..03d9818437 100644
--- a/source4/script/installswat.sh
+++ b/source4/script/installswat.sh
@@ -7,28 +7,24 @@ echo Installing swat files in $SWATDIR
cd $SRCDIR/../swat || exit 1
+mkdir -p $SWATDIR || exit 1
+
installdir() {
- dir=$1
- ext=$2
- mkdir -p $SWATDIR/$dir || exit 1
- for f in `ls $dir/*.$ext`; do
- echo Installing $f
- cp $f $SWATDIR/$dir/ || exit 1
+ for f in $*; do
+ dname=`dirname $f`
+ echo "Installing $f in $dname"
+ test -d $SWATDIR/$dname || mkdir -p $SWATDIR/$dname || exit 1
+ cp $f $SWATDIR/$dname/ || exit 1
chmod 0644 $SWATDIR/$f || exit 1
done
}
-installdir . esp
-installdir esptest esp
-installdir esptest js
-installdir images png
-installdir images gif
-installdir images ico
-installdir scripting ejs
-installdir scripting esp
-installdir scripting js
-installdir style css
-installdir docs js
+installdir *.esp
+installdir esptest/*.esp esptest/*.js
+installdir images/*.png images/*.ico
+installdir scripting/*.ejs scripting/*.esp scripting/*.js
+installdir style/*.css
+installdir docs/*.js
cat << EOF
======================================================================