3 scriptversion=2010-05-09.22; # UTC
5 # Copyright (C) 2010, 2011 Free Software Foundation, Inc.
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 3 of the License, or
10 # (at your option) any later version.
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 # Additional permission under GNU GPL version 3 section 7
23 # Written by Giuseppe Scrivano.
25 if test -f .tarball-version
27 cat .tarball-version | tr -d '\n'
33 test -n "$(bzr diff | tr -d '\n')" && DIRTY="-dirty"
37 TAG=$(bzr tags -r $REVNO | cut -d' ' -f1)
40 TAG=$(bzr tags -r ..$REVNO | cut -d' ' -f1)
43 test -z "$TAG" && TAG="unknown"
49 printf "%s%s" "$TAG" "$DIRTY"
52 # eval: (add-hook 'write-file-hooks 'time-stamp)
53 # time-stamp-start: "scriptversion="
54 # time-stamp-format: "%:y-%02m-%02d.%02H"
55 # time-stamp-time-zone: "UTC"
56 # time-stamp-end: "; # UTC"