projects
/
grml-debootstrap.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
9d3d538
)
Fixed version reported when run from Git (issue #55)
author
Sebastian Pipping
<sebastian@pipping.org>
Tue, 10 Mar 2015 00:47:10 +0000
(
01:47
+0100)
committer
Michael Prokop
<mika@grml.org>
Tue, 10 Mar 2015 13:59:55 +0000
(14:59 +0100)
grml-debootstrap
patch
|
blob
|
history
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")"
-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.$$"