]> diplodocus.org Git - nmh/blobdiff - docs/contrib/build_nmh
Use HasPrefix() instead of strncmp().
[nmh] / docs / contrib / build_nmh
index 693c45788a34ad5d81c1344c6fd87339bfc1bc4f..fc871f8f719038b68ec376abbcb8d0eb87301241 100755 (executable)
@@ -131,7 +131,7 @@ else
     [ "$verbose" -eq 0 ]  &&  git_opts=--quiet
     [ "$branch" == master ]  ||
       git_opts="${git_opts:+$git_opts }--branch $branch"
-    if "$gitdir"/git clone $git_opts "git://$gitrepo/nmh.git"; then
+    if "$gitdir"/git clone --depth 1 $git_opts "git://$gitrepo/nmh.git"; then
       cd nmh  ||  die "failed to clone nmh"
       printf "commit %s\n" `git log --max-count=1 --pretty=format:%H`
     else
@@ -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 --show-error'
-      curl --location $curl_opts "$snapshot" | tar xzf -
+      curl --location $curl_opts "$snapshot" | gzip -d | tar xf -
     else
       die 'unable to find program to download nmh sources'
     fi