Mercurial > hg > xemacs-beta
comparison 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 |
comparison
equal
deleted
inserted
replaced
242:fc816b73a05f | 243:f220cc83d72e |
---|---|
37 ## NOTE: the directory name should *not* end in a trailing slash | 37 ## NOTE: the directory name should *not* end in a trailing slash |
38 | 38 |
39 | 39 |
40 ### Code: | 40 ### Code: |
41 | 41 |
42 XEMACS=$1 # Not used at present | 42 XEMACS="$1" # Not used at present |
43 LISP_FILE=$2 # Should be a binary package tarball | 43 LISP_FILE="$2" # Should be a binary package tarball |
44 DEST_DIR=$3 # Should be a top level package directory | 44 DEST_DIR="$3" # Should be a top level package directory |
45 | 45 |
46 # Test for valid XEmacs executable and valid input file | 46 # Test for valid XEmacs executable and valid input file |
47 if [ \( ! -f ${LISP_FILE} \) -o \( ! -x ${XEMACS} \) ]; then | 47 if [ ! -f "${LISP_FILE}" -o ! -x "${XEMACS}" ]; then |
48 exit 1 | 48 exit 1 |
49 fi | 49 fi |
50 | 50 |
51 # Test for destination directory, creating if necessary | 51 # Test for destination directory, creating if necessary |
52 if [ ! -d ${DEST_DIR} ]; then | 52 test -d "${DEST_DIR}" || mkdir "${DEST_DIR}" |
53 mkdir ${DEST_DIR} | 53 test -d "${DEST_DIR}" || exit 1; |
54 fi | |
55 | 54 |
56 # Very simple minded extraction for the first cut | 55 # Very simple minded extraction for the first cut |
57 # We'll get more sophisticated later | 56 # We'll get more sophisticated later |
58 cd ${DEST_DIR} | 57 cd "${DEST_DIR}" |
59 gunzip -c ${LISP_FILE} | tar xvf - | 58 gunzip -c "${LISP_FILE}" | tar xvf - |
60 | 59 |
61 # Need to refresh the info/dir file, I don't know how to do that. | 60 # Need to refresh the info/dir file, I don't know how to do that. |
62 | 61 |
63 exit 0 | 62 exit 0 |
64 | 63 |