diff options
| author | Paul Buetow <paul@buetow.org> | 2011-10-03 20:33:45 +0000 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2011-10-03 20:33:45 +0000 |
| commit | 550f57cbaaa40a7de968aba1256ed3b02aa92f9a (patch) | |
| tree | 409e0ffe01f2c9177dda9878296bb74e0760e8e6 | |
| parent | 653172a56a7c989c4716cb8342dd236f82688667 (diff) | |
some dirty bugfix
| -rwxr-xr-x | pwgrep.sh | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -203,9 +203,15 @@ pwfls () { done elif [ -z "$arg" ]; then - local -r dir=$WORKDIR/$FILESTOREDIR - [ ! -e $dir ] && error "Category $arg ($dir) does not exist" - info Available file store categories: + local dir=$WORKDIR/$FILESTOREDIR + if [ -z "$USEFILESTORECAT" ]; then + info Available file store categories: + dir=$WORKDIR/$FILESTOREDIR + else + info Available files in store $FILESTORECATEGORY + dir=$WORKDIR/$FILESTOREDIR/$FILESTORECATEGORY + fi + [ ! -e $dir ] && error "Category ($dir) does not exist" ls $dir else local -r dir=$WORKDIR/$FILESTOREDIR/$arg @@ -344,6 +350,7 @@ set_opts () { # Alternate DB DB=$(echo $ARGS | $AWK '{ print $2 }') FILESTORECATEGORY=$DB + USEFILESTORECAT=1 ARGS=$(echo $ARGS | $SED "s/-d $DB//") DB=$DB.gpg set_opts |
