#!/bin/sh
-scriptversion=2010-05-09.22; # UTC
+scriptversion=2011-08-11.08; # UTC
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
DIRTY=""
-test -n "$(bzr diff | tr -d '\n')" && DIRTY="-dirty"
+test -n "`bzr diff | tr -d '\n'`" && DIRTY="-dirty"
-REVNO=$(bzr revno)
+REVNO=`bzr revno`
-TAG=$(bzr tags -r $REVNO | cut -d' ' -f1)
+TAG=`bzr tags -r $REVNO | cut -d' ' -f1`
if test -z "$TAG"
then
- TAG=$(bzr tags -r ..$REVNO | cut -d' ' -f1)
+ TAG=`bzr tags --sort=time -r ..$REVNO | tail -n1 | cut -d' ' -f1`
# No tags yet
test -z "$TAG" && TAG="unknown"