diff options
| author | Paul Buetow <paul@buetow.org> | 2010-12-22 10:54:26 +0000 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2010-12-22 10:54:26 +0000 |
| commit | 278f68e1e1398015a9de60ea2d6cf1ed0a1c87a5 (patch) | |
| tree | 4199818c17c7e79d7f8727a25d66fb99f134eaad | |
| parent | 39dc236deac7710730d6605031025d8cf0f9c190 (diff) | |
bugfix:
-z $NOVERSIONING is now -z "$NOVERSIONING"
| -rwxr-xr-x | pwgrep.sh | 15 |
1 files changed, 11 insertions, 4 deletions
@@ -149,7 +149,7 @@ function pwgrep () { } function pwupdate () { - if [ -z $NOVERSIONING ]; then + if [ -z "$NOVERSIONING" ]; then info Updating repository $VERSIONUPDATE 2>&1 >/dev/null fi @@ -164,7 +164,7 @@ function pwedit () { gpg --output .$PWGREPDB -e -r $GPGKEYID .database && \ $WIPE .database && \ mv .$PWGREPDB $PWGREPDB && \ - [ -z $NOVERSIONING ] && $VERSIONCOMMIT + [ -z "$NOVERSIONING" ] && $VERSIONCOMMIT } function pwdbls () { @@ -207,7 +207,7 @@ function pwfadd () { gpg --output $PWFILEDIREXT/${outfile}.gpg -e -r $GPGKEYID $srcfile && \ - if [ -z $NOVERSIONING ]; then + if [ -z "$NOVERSIONING" ]; then $VERSIONADD $PWFILEDIREXT/${outfile}.gpg && $VERSIONCOMMIT fi } @@ -219,7 +219,7 @@ function pwfdel () { [ ! -e $PWFILEWORKDIR ] && error $PWFILEWORKDIR does not exist [ -z $name ] && error Missing argument - if [ -z $NOVERSIONING ]; then + if [ -z "$NOVERSIONING" ]; then # Wipe even encrypted file securely $WIPE $PWFILEDIREXT/${name}.gpg && \ touch $PWFILEDIREXT/${name}.gpg && $VERSIONCOMMIT && \ @@ -250,6 +250,7 @@ cat <<END Where OPTS are: -o - Offline mode -d <DB NAME> - Using a specific DB + -a - Grepping all available DBs at once END } @@ -283,6 +284,12 @@ function set_opts () { PWGREPDB=$PWGREPDB.gpg set_opts ;; + -a*) + # All DBs at once + ALL=1 + ARGS=${ARGS[@]:2} + set_opts + ;; *) esac } |
