changeset 2253:fe5302520efd

* make-dist: Use gzip, if we can find it.
author Jim Blandy <jimb@redhat.com>
date Thu, 18 Mar 1993 23:06:04 +0000
parents 9793d8654e23
children 9f90d3406b46
files make-dist
diffstat 1 files changed, 15 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/make-dist	Thu Mar 18 22:50:00 1993 +0000
+++ b/make-dist	Thu Mar 18 23:06:04 1993 +0000
@@ -253,8 +253,22 @@
 fi
 
 if [ "${make_tar}" = yes ]; then
+  echo "Looking for gzip."
+  temppath=`echo $PATH | sed 's/^:/.:/
+			      s/::/:.:/g
+			      s/:$/:./
+			      s/:/ /g'`
+  default_compress=`(
+    for dir in ${temppath}; do
+      if [ -f ${dir}/gzip ]; then echo 'gzip --best'; exit 0; fi
+    done
+    echo compress
+  )`
   echo "Creating tar file."
-  (cd ${tempparent}; tar cvf - ${emacsname}) | compress > ${emacsname}.tar.Z
+  (cd ${tempparent}
+   tar cvf - ${emacsname}) \
+   | ${default_compress} > ${emacsname}.tar.Z
+  )
 fi
 
 if [ "${clean_up}" = yes ]; then