Mercurial > masqmail-0.2
annotate misc/gen-dist @ 62:610cd4e09b91
better EXTRA_DIST value
author | meillo@marmaro.de |
---|---|
date | Sat, 29 May 2010 23:48:42 +0200 |
parents | e119cee8d493 |
children | b212da6385a8 |
rev | line source |
---|---|
47 | 1 #!/bin/sh |
2 # | |
3 # generate a tar.gz archive to distribute | |
4 # generate an md5sum and a detached signature of the archive | |
5 # | |
6 # requires: | |
7 # - mercurial (hg) | |
8 # - md5sum | |
9 # - gnupg | |
10 | |
11 if [ $# -ne 1 -o -e "$1" ] ; then | |
60 | 12 echo "usage: gen-dist DEST.tar.gz" 2>&1 |
47 | 13 exit 1 |
14 fi | |
15 | |
50
1761b3bde646
fixed wrong paths in the md5sum file (gen-dist)
meillo@marmaro.de
parents:
47
diff
changeset
|
16 dir="${1%/*}" |
1761b3bde646
fixed wrong paths in the md5sum file (gen-dist)
meillo@marmaro.de
parents:
47
diff
changeset
|
17 file="${1##*/}" |
1761b3bde646
fixed wrong paths in the md5sum file (gen-dist)
meillo@marmaro.de
parents:
47
diff
changeset
|
18 |
47 | 19 hg archive -t tgz "$1" |
50
1761b3bde646
fixed wrong paths in the md5sum file (gen-dist)
meillo@marmaro.de
parents:
47
diff
changeset
|
20 |
1761b3bde646
fixed wrong paths in the md5sum file (gen-dist)
meillo@marmaro.de
parents:
47
diff
changeset
|
21 cd "$dir" |
1761b3bde646
fixed wrong paths in the md5sum file (gen-dist)
meillo@marmaro.de
parents:
47
diff
changeset
|
22 md5sum "$file" >"$file.md5sum" |
1761b3bde646
fixed wrong paths in the md5sum file (gen-dist)
meillo@marmaro.de
parents:
47
diff
changeset
|
23 gpg -ab "$file" |