~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to tools/packaging/lp-upload-release

  • Committer: Martin Pool
  • Date: 2008-10-20 23:58:12 UTC
  • mto: This revision was merged to the branch mainline in revision 3787.
  • Revision ID: mbp@sourcefrog.net-20081020235812-itg90mk0u4dez92z
lp-upload-release now handles names like bzr-1.8.tar.gz

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
 
46
46
# parse the product and release number out of a filename like
47
47
# "bzr-foo-1.23rc1.tar.gz"
48
 
filetype="${upfile:e}"
49
 
filetail=${upfile:t}
50
 
basename="${${upfile:t}%%-[0-9].*}"
51
 
version="${${upfile:t:r}##*-}"
 
48
 
 
49
# need to strip off the .tar too for .tar.gz files
 
50
headpart=${${upfile:r}%.tar}
 
51
filetype="${upfile#${headpart}}"
 
52
basename="${${headpart:t}%%-[0-9].*}"
 
53
version="${${headpart:t}##*-}"
52
54
echo $basename $version $filetype
53
55
 
54
56
# bzr puts just the first part of the version into the series, e.g. 1.8 from 1.8rc1