diff options
| author | Paul Buetow <paul@buetow.org> | 2013-04-08 21:34:13 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2013-04-08 21:34:13 +0200 |
| commit | e5bbcf7dad06012c121327680bab99a00f1071d5 (patch) | |
| tree | 4ba8245a692401ab01e3bccb20531e99d60b1e41 | |
| parent | ab4d6eaab161adc57286f67d905dea5009784b51 (diff) | |
add auto versioning0.8.6
| -rw-r--r-- | Makefile | 3 | ||||
| -rwxr-xr-x | bin/pwgrep.sh | 15 |
2 files changed, 9 insertions, 9 deletions
@@ -8,7 +8,7 @@ build: # 'install' installes a fake-root, which will be used to build the Debian package # $DESTDIR is actually set by the Debian tools. -install: +install: version test ! -d $(DESTDIR)/usr/bin && mkdir -p $(DESTDIR)/usr/bin || exit 0 test ! -d $(DESTDIR)/usr/share/$(NAME) && mkdir -p $(DESTDIR)/usr/share/$(NAME) || exit 0 test ! -d $(DESTDIR)/usr/share/man/man1 && mkdir -p $(DESTDIR)/usr/share/man/man1 || exit 0 @@ -38,6 +38,7 @@ clean: # Parses the version out of the Debian changelog version: cut -d' ' -f2 debian/changelog | head -n 1 | sed 's/(//;s/)//' > .version + sed -i "s/.*PWGREP_VERSION=.*/declare -r PWGREP_VERSION=$$(cat .version)/" ./bin/$(NAME).sh # Builds the documentation into a manpage documentation: diff --git a/bin/pwgrep.sh b/bin/pwgrep.sh index b9d1edc..6e32971 100755 --- a/bin/pwgrep.sh +++ b/bin/pwgrep.sh @@ -1,6 +1,6 @@ #!/bin/bash -# pwgrep v0.8.2 (c) 2009, 2010, 2011, 2013 by Paul Buetow +# pwgrep (c) 2009, 2010, 2011, 2013 by Paul Buetow # pwgrep helps you to manage all your passwords using GnuGP # for encryption and a versioning system (subversion by default) # for keeping track all changes of your password database. In @@ -22,9 +22,11 @@ # You can overwrite the default values by setting env. variables # or by just editing this file. -DEFAULTDB=private.gpg -DEFAULTFILESTOREDIR=filestore -DEFAULTFILESTORECATEGORY=default +declare DEFAULTDB=private.gpg +declare DEFAULTFILESTOREDIR=filestore +declare DEFAULTFILESTORECATEGORY=default +declare -r PWGREP_VERSION=0.8.5 + [ -z "$RCFILE" ] && RCFILE=~/.pwgreprc # Only use mawk or gawk, but if possible not nawk. On *BSD awk=nawk. So try @@ -41,9 +43,6 @@ function source_config () { [ -f $RCFILE ] && source <($SED 's/^/export /' $RCFILE) } -function pwgrep_version () { - sed -n '/# pwgrep v/ { s/# //; p; q; }' $0 -} function configure () { # Reading the current configuration @@ -304,7 +303,7 @@ function fwipe () { } function pwhelp () { - info $(pwgrep_version) + info $PWGREP_VERSION info Possible operations are: cat <<END fwipe <FILE> - Wiping a file |
