Index: zipmoz.sh =================================================================== RCS file: /cvs/oo/external/moz/moztools/zipmoz.sh,v retrieving revision 1.1 diff -u -r1.1 zipmoz.sh --- zipmoz.sh 2001/10/24 13:10:37 1.1 +++ zipmoz.sh 2001/12/13 06:03:49 @@ -22,11 +22,17 @@ echo "\ttarget_dir\tis the directory to place the zips" exit 1 fi +# just to remember the current working directory +STARTING_DIR=`pwd` MOZ_DIST=$1 TARGET=$2 if [ "w$3" != "w" ]; then TARGET_DIR=$3 + # need a full path here + if [ "`echo $TARGET_DIR | cut -c1`" != "/" ]; then + TARGET_DIR=$STARTING_DIR/$TARGET_DIR + fi else if [ "w$TARGET_DIR" == "w" ]; then TARGET_DIR= @@ -38,8 +44,6 @@ ZIP_TARGET=../ fi -# just to remember the current working directory -STARTING_DIR=`pwd` echo echo --- creating zips for $TARGET, using mozilla distribution in $MOZ_DIST @@ -79,7 +83,7 @@ for i in `ls -1 $MOZ_DIST/$INC_FILES`; do if [ ! -d $i ]; then - cp $MOZ_DIST/include/$i $TARGET_DIR/$TARGET/inc/mozilla + cp -r $MOZ_DIST/include/$i $TARGET_DIR/$TARGET/inc/mozilla fi done @@ -92,9 +96,9 @@ # delete old zips -[ -f $TARGET_DIR/$TARGET/runtime.zip ] && rm -f $TARGET_DIR/$TARGET/runtime.zip -[ -f $TARGET_DIR/$TARGET/lib.zip ] && rm -f $TARGET_DIR/$TARGET/lib.zip -[ -f $TARGET_DIR/$TARGET/inc.zip ] && rm -f $TARGET_DIR/$TARGET/inc.zip +[ -f $TARGET_DIR/${TARGET}runtime.zip ] && rm -f $TARGET_DIR/${TARGET}runtime.zip +[ -f $TARGET_DIR/${TARGET}lib.zip ] && rm -f $TARGET_DIR/${TARGET}lib.zip +[ -f $TARGET_DIR/${TARGET}inc.zip ] && rm -f $TARGET_DIR/${TARGET}inc.zip # zip the runtime files