diff options
Diffstat (limited to 'tools/make-dist-tarball')
-rwxr-xr-x | tools/make-dist-tarball | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tools/make-dist-tarball b/tools/make-dist-tarball new file mode 100755 index 00000000..840fe4c0 --- /dev/null +++ b/tools/make-dist-tarball @@ -0,0 +1,25 @@ +#!/bin/sh + +Usage() { + cat <<EOF +Usage: ${0##*/} version + make a tarball of 'version' + must be in a bzr directory, and 'version' must be a tag + +EOF +} + +topdir=$PWD +tag=${1} + +[ -n "$tag" ] || { Usage 1>&2 ; exit 1; } + +tmpd=$(mktemp -d ); +trap "rm -Rf '${tmpd}'" 0 + +out=${topdir}/ec2-init_${tag}.orig.tar.gz + +cd ${tmpd} && + bzr branch "${topdir}" ./ec2-init-${tag} && + tar czf "${out}" ec2-init-${tag}/ --exclude ec2-init-${tag}/.bzr && + echo "wrote ${out}" |