diff options
author | Colin Watson <cjwatson@debian.org> | 2007-07-31 09:55:34 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2007-07-31 09:55:34 +0000 |
commit | 974445b92471a9044ae0ecd65357a1ca86f2ab69 (patch) | |
tree | 5abe04a3993b9ba183ac78eaa1db2dc4fb5c055b | |
parent | 222be15fe07482c02579b89711cba9b2c5ad863d (diff) | |
download | debootstrap-974445b92471a9044ae0ecd65357a1ca86f2ab69.tar.gz |
* Add --version option (closes: #294484).
r48820
-rw-r--r-- | Makefile | 7 | ||||
-rw-r--r-- | debian/changelog | 1 | ||||
-rwxr-xr-x | debootstrap | 7 |
3 files changed, 14 insertions, 1 deletions
@@ -1,6 +1,9 @@ CC=gcc CFLAGS=-Wall -W -O2 +# avoid dpkg-dev dependency; fish out the version with sed +VERSION := $(shell sed 's/.*(\(.*\)).*/\1/; q' debian/changelog) + ARCH := $(shell dpkg --print-architecture) setarchdevs = $(if $(findstring $(ARCH),$(1)),$(2)) @@ -35,7 +38,9 @@ install: ln -s sid $(DSDIR)/scripts/lenny install -o root -g root -m 0755 debootstrap.8 $(DESTDIR)/usr/share/man/man8/ - install -o root -g root -m 0755 debootstrap $(DESTDIR)/usr/sbin/ + sed 's/@VERSION@/$(VERSION)/g' debootstrap >$(DESTDIR)/usr/sbin/debootstrap + chown root:root $(DESTDIR)/usr/sbin/debootstrap + chmod 0755 $(DESTDIR)/usr/sbin/debootstrap install-allarch: install install -o root -g root -m 0644 devices-std.tar.gz \ diff --git a/debian/changelog b/debian/changelog index dc496c7..23da2ef 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,6 +12,7 @@ debootstrap (1.0.2) UNRELEASED; urgency=low closes: #314304). * functions: Stub out /proc setup and add device setup for the Hurd (thanks, Michael Banck; closes: #314311). + * Add --version option (closes: #294484). -- Joey Hess <joeyh@debian.org> Fri, 20 Jul 2007 16:57:37 -0400 diff --git a/debootstrap b/debootstrap index 5184b42..ec9dfa0 100755 --- a/debootstrap +++ b/debootstrap @@ -1,5 +1,7 @@ #!/bin/sh -e +VERSION='@VERSION@' + unset TMP TEMP TMPDIR || true ########################################################################### @@ -65,6 +67,7 @@ usage() echo cat <<EOF --help display this help and exit + --version display version information and exit --verbose don't turn off the output of wget --download-only download packages, but don't perform installation @@ -105,6 +108,10 @@ if [ $# != 0 ] ; then usage exit 0 ;; + --version) + echo "debootstrap $VERSION" + exit 0 + ;; --boot-floppies) if [ -n "$USE_DEBIANINSTALLER_INTERACTION" ] ; then error 1 ARG_BFDI "Can only use one of --boot-floppies and --debian-installer" |