X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=blobdiff_plain;f=grml-debootstrap;h=a850a4e82ec468e84fda1db6c51af23c058103a1;hp=bf97635472200a8a26b74a332006aec150ae2307;hb=b7e825068434bab80452aa1261c7de935f90ac18;hpb=d07cdbbc8d861f7b38eb31d3b10bf37f37bededb diff --git a/grml-debootstrap b/grml-debootstrap index bf97635..a850a4e 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 +#!/bin/bash +# 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.39' +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: @@ -81,7 +82,7 @@ Send bugreports to the grml-team: bugs (at) grml.org || http://grml.org/bugs/ " } -if [ "$1" = '-h' ] || [ "$1" = '-help' ] ; then +if [ "$1" = '-h' ] || [ "$1" = '-help' ] || [ "$1" = "--help" ] ; then usage echo 'Please notice that this script requires root permissions!' exit 0 @@ -90,7 +91,10 @@ fi # make sure we have what we need {{{ check4progs debootstrap dialog || exit 1 -check4root || exit 1 +if ! check4root ; then + echo "For usage instructions please execute '$PN --help'." + exit 1 +fi # }}} # source main configuration file {{{