projects
/
grml-debootstrap.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed version reported when run from Git (issue #55)
[grml-debootstrap.git]
/
grml-debootstrap
diff --git
a/grml-debootstrap
b/grml-debootstrap
index
add5973
..
2a27c46
100755
(executable)
--- a/
grml-debootstrap
+++ b/
grml-debootstrap
@@
-8,7
+8,11
@@
# variables {{{
PN="$(basename "$0")"
# variables {{{
PN="$(basename "$0")"
-VERSION="$(dpkg-query --show --showformat='${Version}' "$PN")"
+if [[ -d "$(dirname "$(which "$0")")"/.git ]]; then
+ VERSION="$(git describe | sed 's|^v||')"
+else
+ VERSION="$(dpkg-query --show --showformat='${Version}' "$PN")"
+fi
VERSION="${VERSION:-unknown}"
MNTPOINT="/mnt/debootstrap.$$"
VERSION="${VERSION:-unknown}"
MNTPOINT="/mnt/debootstrap.$$"