X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/69181512bd1798ed632ab8c201afc3a7901b05e7..ef1ba39e8dae81091b6c3e73e72825ef6edea3c6:/docs/contrib/build_nmh diff --git a/docs/contrib/build_nmh b/docs/contrib/build_nmh index fc558902..fc871f8f 100755 --- a/docs/contrib/build_nmh +++ b/docs/contrib/build_nmh @@ -131,9 +131,9 @@ 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" - 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