X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=blobdiff_plain;f=grml-debootstrap;h=2a27c460c20af95d61050fe1759c389c697dbf96;hp=739fd86d78a0e2d012165ecdc421ca8157e3d6d0;hb=b3cddceda4de4d2417cbba3b7e8ae78fd72764f0;hpb=f992b13b0e020e75dd4d6592f8d18f0ccafe9e5f diff --git a/grml-debootstrap b/grml-debootstrap index 739fd86..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.$$" @@ -378,7 +382,7 @@ fi # make sure we have what we need {{{ if [ -n "$VIRTUAL" ] ; then - check4progs kpartx mksh parted qemu-img || bailout 1 + check4progs grub-mkimage kpartx mksh parted qemu-img || bailout 1 fi # }}}