cloud-init/packages/make-dist-tarball
Joshua Harlow 87a0c46d22 1. Moving around the packages dir.
2. Adjusting the bddep shell script
3. Starting to add a brpm
2012-06-25 12:28:59 -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}"