]> diplodocus.org Git - nmh/blobdiff - docs/contrib/build_nmh
build_nmh: Use `gzip -d' rather than assume tar has -z.
[nmh] / docs / contrib / build_nmh
index fc55890288bc4bc478338e5ff447ae1111cf1ee2..358531dce9c6d228ffc78e96870731dbd79c6cff 100755 (executable)
@@ -133,7 +133,7 @@ else
       git_opts="${git_opts:+$git_opts }--branch $branch"
     if "$gitdir"/git clone $git_opts "git://$gitrepo/nmh.git"; then
       cd nmh  ||  die "failed to clone nmh"
-      git log --max-count=1 --pretty-format:%H
+      printf "commit %s\n" `git log --max-count=1 --pretty=format:%H`
     else
       die 'failed to clone git repo'
     fi
@@ -146,10 +146,10 @@ else
     snapshot="$repo/$tarball"
     if [ "`finddir wget`" ]; then
       [ "$verbose" -eq 0 ] && wget_opts='--quiet'
-      wget --output-document - $wget_opts "$snapshot" | tar xzf -
+      wget --output-document - $wget_opts "$snapshot" | gzip -d | tar xf -
     elif [ "`finddir curl`" ]; then
-      [ "$verbose" -eq 0 ] && curl_opts=--silent
-      curl --location $curl_opts "$snapshot" | tar xzf -
+      [ "$verbose" -eq 0 ] && curl_opts='--silent --show-error'
+      curl --location $curl_opts "$snapshot" | gzip -d | tar xf -
     else
       die 'unable to find program to download nmh sources'
     fi