stagit

static git page generator  https://git.ce9e.org
git clone https://git.ce9e.org/stagit.git

commit
20c37e4fe4bfef13642542f3fa15aa73c92a037c
parent
31392c13cf805602c6e4a46695a27325d908f3fb
Author
Hiltjo Posthuma <hiltjo@codemadness.org>
Date
2018-01-28 15:27
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 files changed, 8 insertions, 2 deletions


diff --git a/README b/README

@@ -123,8 +123,14 @@ Create .tar.gz archives by tag
  123   123 	name="stagit"
  124   124 	mkdir -p archives
  125   125 	git tag -l | while read -r t; do
  126    -1 		f="archives/$name-$t.tar.gz"
  127    -1 		test -f "$f" || git archive --format tar.gz "$t" -o "$f"
   -1   126 		f="archives/${name}-$(echo "${t}" | tr '/' '_').tar.gz"
   -1   127 		test -f "${f}" && continue
   -1   128 		git archive \
   -1   129 			--format tar.gz \
   -1   130 			--prefix "${t}/" \
   -1   131 			-o "${f}" \
   -1   132 			-- \
   -1   133 			"${t}"
  128   134 	done
  129   135 
  130   136