Introduction
Introduction Statistics Contact Development Disclaimer Help
README: improve tarball generation by tag example - stagit - static git page ge…
git clone git://git.codemadness.org/stagit
Log
Files
Refs
README
LICENSE
---
commit 20c37e4fe4bfef13642542f3fa15aa73c92a037c
parent 31392c13cf805602c6e4a46695a27325d908f3fb
Author: Hiltjo Posthuma <[email protected]>
Date: Sun, 28 Jan 2018 16:27:10 +0100
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:
M README | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
---
diff --git 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
You are viewing proxied material from codemadness.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.