3 # Output arch (tla/Bazaar) archive names, with support for branches
5 # Copyright (C) 2005 Colin Watson <cjwatson@debian.org>
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2, or (at your option) any
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
20 # Which arch implementation should we use?
21 if type baz >/dev/null 2>&1; then
28 ME="$($PROGRAM tree-version)"
30 if [ "$WANTED" ]; then
31 ARCHIVE="$($PROGRAM parse-package-name --arch "$ME")"
32 CATEGORY="$($PROGRAM parse-package-name --category "$ME")"
35 echo "$ARCHIVE/$CATEGORY--$WANTED"
38 VERSION="$($PROGRAM parse-package-name --vsn "$ME")"
39 echo "$ARCHIVE/$CATEGORY--$WANTED--$VERSION"