diff lib-src/add-big-package.sh @ 243:f220cc83d72e r20-5b20

Import from CVS: tag r20-5b20
author cvs
date Mon, 13 Aug 2007 10:17:07 +0200
parents 850242ba4a81
children 74fd4e045ea6
line wrap: on
line diff
--- a/lib-src/add-big-package.sh	Mon Aug 13 10:16:17 2007 +0200
+++ b/lib-src/add-big-package.sh	Mon Aug 13 10:17:07 2007 +0200
@@ -39,24 +39,23 @@
 
 ### Code:
 
-XEMACS=$1			# Not used at present
-LISP_FILE=$2			# Should be a binary package tarball
-DEST_DIR=$3			# Should be a top level package directory
+XEMACS="$1"			# Not used at present
+LISP_FILE="$2"			# Should be a binary package tarball
+DEST_DIR="$3"			# Should be a top level package directory
 
 # Test for valid XEmacs executable and valid input file
-if [ \( ! -f ${LISP_FILE} \) -o \( ! -x ${XEMACS} \) ]; then
+if [ ! -f "${LISP_FILE}" -o ! -x "${XEMACS}" ]; then
 	exit 1
 fi
 
 # Test for destination directory, creating if necessary
-if [ ! -d ${DEST_DIR} ]; then
-	mkdir ${DEST_DIR}
-fi
+test -d "${DEST_DIR}" || mkdir "${DEST_DIR}"
+test -d "${DEST_DIR}" || exit 1;
 
 # Very simple minded extraction for the first cut
 # We'll get more sophisticated later
-cd ${DEST_DIR}
-gunzip -c ${LISP_FILE} | tar xvf -
+cd "${DEST_DIR}"
+gunzip -c "${LISP_FILE}" | tar xvf -
 
 # Need to refresh the info/dir file, I don't know how to do that.