]> git.phdru.name Git - mimedecode.git/commitdiff
Export given treeish or HEAD
authorOleg Broytman <phd@phdru.name>
Sun, 27 Dec 2015 16:42:42 +0000 (19:42 +0300)
committerOleg Broytman <phd@phdru.name>
Sun, 27 Dec 2015 16:42:42 +0000 (19:42 +0300)
mk-distr

index 4b75f166da1b27e488386a2ad6b38e62024176c8..ecce71261f302ded2c896e764f3ed4aea5882d91 100755 (executable)
--- a/mk-distr
+++ b/mk-distr
@@ -1,12 +1,8 @@
 #! /bin/sh
 
-if [ -n "$1" ]; then
-   git checkout "$1"
-fi &&
-
 umask 022 &&
 
-git archive --format=tar --prefix=mimedecode/ HEAD |
+git archive --format=tar --prefix=mimedecode/ "${1:-HEAD}" |
    (cd "$HOME/tmp" && exec tar xf -) &&
 
 # Copy mimedecode.docbook with timestamp to avoid rebuilding