]> git.armaanb.net Git - stagit.git/commitdiff
README: add example to create tar.gz archives by tag
authorHiltjo Posthuma <hiltjo@codemadness.org>
Wed, 5 Jul 2017 18:25:54 +0000 (20:25 +0200)
committerHiltjo Posthuma <hiltjo@codemadness.org>
Wed, 5 Jul 2017 18:25:54 +0000 (20:25 +0200)
README

diff --git a/README b/README
index b2bf8e885f41a680fc99f86437b5decffe82846c..c1d5ad4ed311e63f9275c62e18a673d267e8b150 100644 (file)
--- a/README
+++ b/README
@@ -78,6 +78,17 @@ Script:
        }'
 
 
+Create .tar.gz archives by tag
+------------------------------
+       #!/bin/sh
+       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"
+       done
+
+
 Features
 --------