view misc/gen-dist @ 50:1761b3bde646

fixed wrong paths in the md5sum file (gen-dist)
author meillo@marmaro.de
date Thu, 20 May 2010 21:49:24 +0200
parents 315b74beec1a
children e119cee8d493
line wrap: on
line source

#!/bin/sh
#
# generate a tar.gz archive to distribute
# generate an md5sum and a detached signature of the archive
#
# requires:
# - mercurial (hg)
# - md5sum
# - gnupg

if [ $# -ne 1 -o -e "$1" ] ; then
	echo "usage: gen-dist DESTINATION" 2>&1
	exit 1
fi

dir="${1%/*}"
file="${1##*/}"

hg archive -t tgz "$1"

cd "$dir"
md5sum "$file" >"$file.md5sum"
gpg -ab "$file"