From 17695f75820fc982acc48acff837cb7e60de1bae Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Thu, 2 Dec 2010 14:55:13 +0100 Subject: [PATCH] Dynamically calculate version number using the Debian package version. --- grml-debootstrap | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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: -- 2.1.4