cloud-init/tools/make-dist-tarball
Joshua Harlow a80727a512 Reworking these to look attempt to find the right parent directory, as well
as adjustments due to sysvinit rename.
2012-07-06 17:29:09 -07:00

26 lines
492 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}"