summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2011-10-03 20:33:45 +0000
committerPaul Buetow <paul@buetow.org>2011-10-03 20:33:45 +0000
commit550f57cbaaa40a7de968aba1256ed3b02aa92f9a (patch)
tree409e0ffe01f2c9177dda9878296bb74e0760e8e6
parent653172a56a7c989c4716cb8342dd236f82688667 (diff)
some dirty bugfix
-rwxr-xr-xpwgrep.sh13
1 files changed, 10 insertions, 3 deletions
diff --git a/pwgrep.sh b/pwgrep.sh
index 3039ce6..5b48474 100755
--- a/pwgrep.sh
+++ b/pwgrep.sh
@@ -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