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

« back to all changes in this revision

Viewing changes to tools/make-dist-tarball

  • Committer: Scott Moser
  • Date: 2012-07-06 21:24:18 UTC
  • mfrom: (1.1.26)
  • Revision ID: smoser@ubuntu.com-20120706212418-zwcpwxsdodi0pms3
New upstream snapshot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh
2
 
 
3
 
Usage() {
4
 
   cat <<EOF
5
 
Usage: ${0##*/} version
6
 
   make a tarball of 'version'
7
 
   must be in a bzr directory, and 'version' must be a tag
8
 
 
9
 
EOF
10
 
}
11
 
 
12
 
topdir=$PWD
13
 
tag=${1}
14
 
 
15
 
[ -n "$tag" ] || { Usage 1>&2 ; exit 1; }
16
 
 
17
 
tmpd=$(mktemp -d ); 
18
 
trap "rm -Rf '${tmpd}'" 0
19
 
 
20
 
out=${topdir}/cloud-init-${tag}.tar.gz
21
 
 
22
 
cd ${tmpd} && 
23
 
   bzr branch -r "tag:${tag}" "${topdir}" ./cloud-init-${tag} &&
24
 
   tar czf "${out}" cloud-init-${tag}/ --exclude cloud-init-${tag}/.bzr &&
25
 
   echo "wrote ${out}"