summaryrefslogtreecommitdiff
path: root/tools/make-dist-tarball
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@yahoo-inc.com>2012-07-09 15:36:16 -0400
committerScott Moser <smoser@ubuntu.com>2012-07-09 15:36:16 -0400
commit7cd3e340264365c2e968b72cce78db9ff74b24a7 (patch)
tree4a7872cde84ca0d29e7e163f768aed564a8fa208 /tools/make-dist-tarball
parent492dc7478e0ab3eb03eb3b0b5d0e47812339b83f (diff)
parentc7aeea86fb8a17e4402cfc42626dfff2fb04c1a0 (diff)
downloadvyos-cloud-init-7cd3e340264365c2e968b72cce78db9ff74b24a7.tar.gz
vyos-cloud-init-7cd3e340264365c2e968b72cce78db9ff74b24a7.zip
rework packaging tools to find the right cloud-init topdir
This also fixes 'brpm' to address --init-system change that smoser made to setup.py before the large 'rework' merge.
Diffstat (limited to 'tools/make-dist-tarball')
-rwxr-xr-xtools/make-dist-tarball25
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..622283bd
--- /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}/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}"