cloud-init/tools/make-dist-tarball
Scott Moser 34654bc8a8 make-dist-tarball: make output not be debian-like
instead of cloud-init_0.6.2.orig.tar.gz, create cloud-init-0.6.2.tar.gz
2011-10-27 22:10:57 -04:00

26 lines
487 B
Bash
Executable File

#!/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}/cloud-init-${tag}.tar.gz
cd ${tmpd} &&
bzr branch -r "tag:${tag}" "${topdir}" ./cloud-init-${tag} &&
tar czf "${out}" cloud-init-${tag}/ --exclude cloud-init-${tag}/.bzr &&
echo "wrote ${out}"