summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2011-02-04 16:58:24 -0500
committerScott Moser <smoser@ubuntu.com>2011-02-04 16:58:24 -0500
commit7077e1481ee22d99126ceb011b8819bd1a23487c (patch)
tree9a62b5b5d8296becf02197023850d80a502cd665 /tools
parent38b21ce3c0972d0659c4a4a9fb22640ff1d3f439 (diff)
downloadvyos-cloud-init-7077e1481ee22d99126ceb011b8819bd1a23487c.tar.gz
vyos-cloud-init-7077e1481ee22d99126ceb011b8819bd1a23487c.zip
add a debian.trunk dir and tools/bddeb to easily build a deb from here
Diffstat (limited to 'tools')
-rwxr-xr-xtools/bddeb20
1 files changed, 20 insertions, 0 deletions
diff --git a/tools/bddeb b/tools/bddeb
new file mode 100755
index 00000000..5f748919
--- /dev/null
+++ b/tools/bddeb
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+TEMP_D=$(mktemp -d "${TMPDIR:-/tmp}/${0##*/}.XXXXXXX")
+#TEMP_D=/tmp/my.d
+start=${PWD}
+rm -Rf "${TEMP_D}"; mkdir "${TEMP_D}"
+set -e
+trap "rm -Rf '${TEMP_D}'" exit
+files=$(bzr ls --versioned)
+mkdir "${TEMP_D}/cloud-init"
+tar -cf - ${files} | tar -C "${TEMP_D}/cloud-init" -xf -
+if [ ! -d "${TEMP_D}/cloud-init/debian" ]; then
+ rsync -a debian.trunk/ "${TEMP_D}/cloud-init/debian"
+fi
+cd "${TEMP_D}/cloud-init"
+debuild "$@"
+for x in ../*.deb; do
+ echo wrote ${x##*/}
+done
+mv ../*.deb "${start}"