~ubuntu-branches/ubuntu/lucid/cloud-init/lucid-updates

« back to all changes in this revision

Viewing changes to tools/make-dist-tarball

  • Committer: Bazaar Package Importer
  • Author(s): Scott Moser
  • Date: 2010-02-04 03:00:05 UTC
  • Revision ID: james.westby@ubuntu.com-20100204030005-r2y1568be8rbslxo
Tags: upstream-0.5.3
ImportĀ upstreamĀ versionĀ 0.5.3

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}.orig.tar.gz
 
21
 
 
22
cd ${tmpd} && 
 
23
   bzr branch "${topdir}" ./cloud-init-${tag} &&
 
24
   tar czf "${out}" cloud-init-${tag}/ --exclude cloud-init-${tag}/.bzr &&
 
25
   echo "wrote ${out}"