diff options
author | Andreas Wansner <andreas@anwa-soft.de> | 2014-12-17 17:35:09 +0100 |
---|---|---|
committer | Andreas Wansner <andreas@anwa-soft.de> | 2014-12-17 17:35:09 +0100 |
commit | 339d3bdcccd9f05996e5122194269e9b5ce44818 (patch) | |
tree | 8583ce3209ae78be7c770f4a148e135cc49c421b | |
parent | ac74851939a8bbcf7cd8d1b9d07bc6ad631f6fa6 (diff) |
Add commandline option --version
-rw-r--r-- | Makefile | 12 | ||||
-rwxr-xr-x | etckeeper | 3 |
2 files changed, 11 insertions, 4 deletions
@@ -15,11 +15,11 @@ INSTALL_EXE=${INSTALL} INSTALL_DATA=${INSTALL} -m 0644 PYTHON=python -build: etckeeper.spec +build: etckeeper.spec etckeeper.version -$(PYTHON) ./etckeeper-bzr/__init__.py build || echo "** bzr support not built" -$(PYTHON) ./etckeeper-dnf/etckeeper.py build || echo "** DNF support not built" -install: +install: etckeeper.version mkdir -p $(DESTDIR)$(etcdir)/etckeeper/ $(DESTDIR)$(vardir)/cache/etckeeper/ $(CP) *.d $(DESTDIR)$(etcdir)/etckeeper/ $(INSTALL_DATA) $(CONFFILE) $(DESTDIR)$(etcdir)/etckeeper/etckeeper.conf @@ -55,11 +55,15 @@ endif -$(PYTHON) ./etckeeper-bzr/__init__.py install --root=$(DESTDIR) ${PYTHON_INSTALL_OPTS} || echo "** bzr support not installed" echo "** installation successful" -clean: etckeeper.spec +clean: etckeeper.spec etckeeper.version rm -rf build etckeeper.spec: sed -i~ "s/Version:.*/Version: $$(perl -e '$$_=<>;print m/\((.*?)\)/'<debian/changelog)/" etckeeper.spec rm -f etckeeper.spec~ -.PHONY: etckeeper.spec +etckeeper.version: + sed -i~ "s/Version:.*/Version: $$(perl -e '$$_=<>;print m/\((.*?)\)/'<debian/changelog)\"/" etckeeper + rm -f etckeeper~ + +.PHONY: etckeeper.spec etckeeper.version @@ -64,6 +64,9 @@ if [ -z "$1" ]; then elif [ "x$1" = "x-h" ] || [ "x$1" = "x--help" ]; then man etckeeper || echo "Usage: etckeeper command [-d directory]" >&2 exit 0 +elif [ "x$1" = "x-v" ] || [ "x$1" = "x--version" ]; then + echo "Version: 1.17" + exit 0 fi command="$1" shift 1 |