masqmail

view devel/gen-dist @ 312:c74adb7c4f50

null-terminated the decoded base64 strings The returned size is still the same. I only alloced one byte more and filled it with zero. TODO: I'm not sure if the allocated size is exact. It's large enough but maybe too large.
author meillo@marmaro.de
date Sun, 24 Apr 2011 20:13:47 +0200
parents b212da6385a8
children
line source
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
11 if [ $# -ne 1 -o -e "$1" ] ; then
12 echo "usage: gen-dist DEST.tar.gz" 2>&1
13 exit 1
14 fi
16 dir="${1%/*}"
17 file="${1##*/}"
19 hg archive -t tgz -X .hg\* "$1"
21 cd "$dir"
22 md5sum "$file" >"$file.md5sum"
23 gpg -ab "$file"