~ubuntu-branches/ubuntu/saucy/cloud-init/saucy

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/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; }

out="${topdir}/cloud-init-${tag}.tar.gz"

bzr export --format=tgz --root="cloud-init-$tag" \
    "--revision=tag:${tag}" "$out" "$topdir" &&
    echo "Wrote ${out}"