annotate devel/gen-dist @ 281:ea5f86e0a81c

modes are now enforced exclusive Other MTAs (exim, postfix) are more relaxing, but as combinations of exclusive modes are senseless we behave more obvious if we fail early. This makes understanding the behavior easier too.
author markus schnalke <meillo@marmaro.de>
date Tue, 07 Dec 2010 14:04:56 -0300
parents 7b70bf4f1f42
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
47
315b74beec1a added a script to generate a release
meillo@marmaro.de
parents:
diff changeset
1 #!/bin/sh
315b74beec1a added a script to generate a release
meillo@marmaro.de
parents:
diff changeset
2 #
315b74beec1a added a script to generate a release
meillo@marmaro.de
parents:
diff changeset
3 # generate a tar.gz archive to distribute
315b74beec1a added a script to generate a release
meillo@marmaro.de
parents:
diff changeset
4 # generate an md5sum and a detached signature of the archive
315b74beec1a added a script to generate a release
meillo@marmaro.de
parents:
diff changeset
5 #
315b74beec1a added a script to generate a release
meillo@marmaro.de
parents:
diff changeset
6 # requires:
315b74beec1a added a script to generate a release
meillo@marmaro.de
parents:
diff changeset
7 # - mercurial (hg)
315b74beec1a added a script to generate a release
meillo@marmaro.de
parents:
diff changeset
8 # - md5sum
315b74beec1a added a script to generate a release
meillo@marmaro.de
parents:
diff changeset
9 # - gnupg
315b74beec1a added a script to generate a release
meillo@marmaro.de
parents:
diff changeset
10
315b74beec1a added a script to generate a release
meillo@marmaro.de
parents:
diff changeset
11 if [ $# -ne 1 -o -e "$1" ] ; then
60
e119cee8d493 tiny improvement in usage message
meillo@marmaro.de
parents: 50
diff changeset
12 echo "usage: gen-dist DEST.tar.gz" 2>&1
47
315b74beec1a added a script to generate a release
meillo@marmaro.de
parents:
diff changeset
13 exit 1
315b74beec1a added a script to generate a release
meillo@marmaro.de
parents:
diff changeset
14 fi
315b74beec1a added a script to generate a release
meillo@marmaro.de
parents:
diff changeset
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
104
b212da6385a8 remove all mercurial files from distribution
meillo@marmaro.de
parents: 60
diff changeset
19 hg archive -t tgz -X .hg\* "$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"