summaryrefslogtreecommitdiff
path: root/tools/make-dist-tarball
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@yahoo-inc.com>2012-07-06 17:29:09 -0700
committerJoshua Harlow <harlowja@yahoo-inc.com>2012-07-06 17:29:09 -0700
commitc7aeea86fb8a17e4402cfc42626dfff2fb04c1a0 (patch)
tree032389ae7e0e7ffb1541086a9c60731492825e06 /tools/make-dist-tarball
parentb2a21ed1dc682a262d55a4202c6b9606496d211f (diff)
downloadvyos-cloud-init-c7aeea86fb8a17e4402cfc42626dfff2fb04c1a0.tar.gz
vyos-cloud-init-c7aeea86fb8a17e4402cfc42626dfff2fb04c1a0.zip
Reworking these to look attempt to find the right parent directory, as well
as adjustments due to sysvinit rename.
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}"