summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2010-01-29 13:28:17 -0500
committerScott Moser <smoser@ubuntu.com>2010-01-29 13:28:17 -0500
commitcfb7cda5b05232d014e56f06e0531d8d4dca5658 (patch)
tree7d5310a8d0e01800d2398ad4330f1db7914e592f /tools
parent994a9a7d53fcbba2c3804633f80775970ece1a80 (diff)
downloadvyos-cloud-init-cfb7cda5b05232d014e56f06e0531d8d4dca5658.tar.gz
vyos-cloud-init-cfb7cda5b05232d014e56f06e0531d8d4dca5658.zip
add 'make-dist-tarball' just for making a clean tarfile from a tag
Diffstat (limited to 'tools')
-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..840fe4c0
--- /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}/ec2-init_${tag}.orig.tar.gz
+
+cd ${tmpd} &&
+ bzr branch "${topdir}" ./ec2-init-${tag} &&
+ tar czf "${out}" ec2-init-${tag}/ --exclude ec2-init-${tag}/.bzr &&
+ echo "wrote ${out}"