X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=blobdiff_plain;f=grml-debootstrap;h=2a27c460c20af95d61050fe1759c389c697dbf96;hp=add5973df8356d08923fe1c7b2d4044c8dbb2df7;hb=b3cddceda4de4d2417cbba3b7e8ae78fd72764f0;hpb=9d3d53815af22205fb4ba15419c254f21d410a19 diff --git a/grml-debootstrap b/grml-debootstrap index add5973..2a27c46 100755 --- 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.$$"