From 0add9cb6fc609751afdeea43f710920832311711 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 26 Jun 2005 04:30:48 +0000 Subject: r7920: another attempt at making installswat.sh portable (This used to be commit 46416ebd9d61038eff96ede77ca0823ea43923a6) --- source4/script/installswat.sh | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) (limited to 'source4/script/installswat.sh') 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 ====================================================================== -- cgit