Mercurial > hg > xemacs-beta
comparison lib-src/add-little-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 |
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 | 42 XEMACS="$1" |
43 LISP_FILE=$2 | 43 LISP_FILE="$2" |
44 DEST_DIR=$3 | 44 DEST_DIR="$3" |
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 cp ${LISP_FILE} ${DEST_DIR} | 55 cp -p "${LISP_FILE}" "${DEST_DIR}" || exit 1; |
57 ${XEMACS} -batch -q -no-site-file -f batch-byte-compile \ | 56 "${XEMACS}" -batch -no-site-file -f batch-byte-compile \ |
58 ${DEST_DIR}/`basename ${LISP_FILE}` | 57 "${DEST_DIR}/"`basename ${LISP_FILE}` |
59 | 58 |
60 # recompute autoloads ... | 59 # recompute autoloads ... |
61 ${XEMACS} -batch -q -no-site-file -l autoload \ | 60 "${XEMACS}" -batch -no-site-file -l autoload \ |
62 -f batch-update-directory ${DEST_DIR} | 61 -f batch-update-directory "${DEST_DIR}" |
63 # and bytecompile if one was created | 62 # and bytecompile if one was created |
64 if [ -f ${DEST_DIR}/auto-autoloads.el ]; then | 63 if [ -f "${DEST_DIR}/auto-autoloads.el" ]; then |
65 ${XEMACS} -batch -q -no-site-file -f batch-byte-compile \ | 64 "${XEMACS}" -batch -no-site-file -f batch-byte-compile \ |
66 ${DEST_DIR}/auto-autoloads.el | 65 "${DEST_DIR}"/auto-autoloads.el |
67 fi | 66 fi |
68 | 67 |
69 # recompute custom-loads | 68 # recompute custom-loads |
70 ${XEMACS} -batch -q -no-site-file -l cus-dep \ | 69 "${XEMACS}" -batch -no-site-file -l cus-dep \ |
71 -f Custom-make-dependencies ${DEST_DIR} | 70 -f Custom-make-dependencies "${DEST_DIR}" |
72 # and bytecompile if one was created | 71 # and bytecompile if one was created |
73 if [ -f ${DEST_DIR}/custom-load.el ]; then | 72 if [ -f "${DEST_DIR}/custom-load.el" ]; then |
74 ${XEMACS} -batch -q -no-site-file -f batch-byte-compile \ | 73 "${XEMACS}" -batch -no-site-file -f batch-byte-compile \ |
75 ${DEST_DIR}/custom-load.el | 74 "${DEST_DIR}"/custom-load.el |
76 fi | 75 fi |
77 | 76 |
78 exit 0 | 77 exit 0 |
79 | 78 |
80 ### add-little-package.sh ends here | 79 ### add-little-package.sh ends here |