Mercurial > emacs
comparison make-dist @ 2254:9f90d3406b46
Add a --compress option to force make-dist to use compress.
author | Jim Blandy <jimb@redhat.com> |
---|---|
date | Thu, 18 Mar 1993 23:12:47 +0000 |
parents | fe5302520efd |
children | 4b57c6f61299 |
comparison
equal
deleted
inserted
replaced
2253:fe5302520efd | 2254:9f90d3406b46 |
---|---|
37 ## for creating incremental or patch distributions | 37 ## for creating incremental or patch distributions |
38 "--newer") | 38 "--newer") |
39 newer="$2" | 39 newer="$2" |
40 new_extension=".new" | 40 new_extension=".new" |
41 shift | 41 shift |
42 ;; | |
43 ## This option tells make-dist to use `compress' instead of gzip. | |
44 ## Normally, make-dist uses gzip whenever it is present. | |
45 "--compress") | |
46 default_gzip="compress" | |
42 ;; | 47 ;; |
43 * ) | 48 * ) |
44 echo "${progname}: Unrecognized argument: $1" >&2 | 49 echo "${progname}: Unrecognized argument: $1" >&2 |
45 exit 1 | 50 exit 1 |
46 ;; | 51 ;; |
251 ## them with. | 256 ## them with. |
252 find ${tempparent} \( -name '*.elc' -o ! -newer ${newer} \) -exec rm -f {} \; | 257 find ${tempparent} \( -name '*.elc' -o ! -newer ${newer} \) -exec rm -f {} \; |
253 fi | 258 fi |
254 | 259 |
255 if [ "${make_tar}" = yes ]; then | 260 if [ "${make_tar}" = yes ]; then |
256 echo "Looking for gzip." | 261 if [ "${default_gzip}" = "" ]; then |
257 temppath=`echo $PATH | sed 's/^:/.:/ | 262 echo "Looking for gzip." |
258 s/::/:.:/g | 263 temppath=`echo $PATH | sed 's/^:/.:/ |
259 s/:$/:./ | 264 s/::/:.:/g |
260 s/:/ /g'` | 265 s/:$/:./ |
261 default_compress=`( | 266 s/:/ /g'` |
262 for dir in ${temppath}; do | 267 default_gzip=`( |
263 if [ -f ${dir}/gzip ]; then echo 'gzip --best'; exit 0; fi | 268 for dir in ${temppath}; do |
264 done | 269 if [ -f ${dir}/gzip ]; then echo 'gzip --best'; exit 0; fi |
265 echo compress | 270 done |
266 )` | 271 echo compress |
272 )` | |
273 fi | |
267 echo "Creating tar file." | 274 echo "Creating tar file." |
268 (cd ${tempparent} | 275 (cd ${tempparent} |
269 tar cvf - ${emacsname}) \ | 276 tar cvf - ${emacsname}) \ |
270 | ${default_compress} > ${emacsname}.tar.Z | 277 | ${default_gzip} > ${emacsname}.tar.Z |
271 ) | 278 ) |
272 fi | 279 fi |
273 | 280 |
274 if [ "${clean_up}" = yes ]; then | 281 if [ "${clean_up}" = yes ]; then |
275 echo "Cleaning up the staging directory." | 282 echo "Cleaning up the staging directory." |