aboutsummaryrefslogtreecommitdiffstats
path: root/README
diff options
context:
space:
mode:
authorHiltjo Posthuma <[email protected]>2018-01-28 16:27:10 +0100
committerHiltjo Posthuma <[email protected]>2018-01-28 16:27:10 +0100
commit20c37e4fe4bfef13642542f3fa15aa73c92a037c (patch)
tree08f87cc3195cb99da90fef2d09fa4b80e92b776a /README
parent31392c13cf805602c6e4a46695a27325d908f3fb (diff)
downloadstagit-20c37e4fe4bfef13642542f3fa15aa73c92a037c.tar.gz
stagit-20c37e4fe4bfef13642542f3fa15aa73c92a037c.zip
README: improve tarball generation by tag example
- set the project name + '-' + tag name as prefix. - allow '/' in the tag name. - allow '-' as suffix in the tag.
Diffstat (limited to 'README')
-rw-r--r--README10
1 files changed, 8 insertions, 2 deletions
diff --git a/README b/README
index d916cc8..6354725 100644
--- a/README
+++ b/README
@@ -123,8 +123,14 @@ Create .tar.gz archives by tag
name="stagit"
mkdir -p archives
git tag -l | while read -r t; do
- f="archives/$name-$t.tar.gz"
- test -f "$f" || git archive --format tar.gz "$t" -o "$f"
+ f="archives/${name}-$(echo "${t}" | tr '/' '_').tar.gz"
+ test -f "${f}" && continue
+ git archive \
+ --format tar.gz \
+ --prefix "${t}/" \
+ -o "${f}" \
+ -- \
+ "${t}"
done