From: Michael Prokop Date: Thu, 2 Dec 2010 13:55:13 +0000 (+0100) Subject: Dynamically calculate version number using the Debian package version. X-Git-Tag: v0.41~5 X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=commitdiff_plain;h=17695f75820fc982acc48acff837cb7e60de1bae;hp=97eb00ef4965f57bb81972b87d0e2fa4fa1ec8d2 Dynamically calculate version number using the Debian package version. --- diff --git a/grml-debootstrap b/grml-debootstrap index 2fb9381..16f02b2 100755 --- a/grml-debootstrap +++ b/grml-debootstrap @@ -1,9 +1,9 @@ #!/bin/sh -# Filename: grml-bootstrap -# Purpose: wrapper around debootstrap for installing plain Debian via grml +# Filename: grml-debootstrap +# Purpose: wrapper around debootstrap for installing plain Debian via Grml # Authors: grml-team (grml.org), (c) Michael Prokop # Bug-Reports: see http://grml.org/bugs/ -# License: This file is licensed under the GPL v2. +# License: This file is licensed under the GPL v2+ ################################################################################ # http://www.debian.org/releases/stable/i386/index.html.en @@ -11,7 +11,8 @@ set -e # exit on any error # variables {{{ PN="$(basename $0)" -VERSION='0.40' +VERSION="$(dpkg --list $PN 2>/dev/null| awk '/^i/ {print $3}')" +VERSION="${VERSION:-unknown}" MNTPOINT="/mnt/debootstrap.$$" # inside the chroot system locales might not be available, so use minimum: