diff options
| author | Paul Buetow <paul@buetow.org> | 2010-09-19 11:19:21 +0000 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2010-09-19 11:19:21 +0000 |
| commit | af991fc9c786de343eb9cb1cbd2a25afa192d22e (patch) | |
| tree | 02d2b893030e2b66b4493555a433802a2eacb9bc | |
| parent | d22c5109dc5f5531cef3355152e7c81dde109212 (diff) | |
added help
| -rw-r--r-- | CHANGELOG.txt | 1 | ||||
| -rwxr-xr-x | pwgrep.sh | 37 |
2 files changed, 29 insertions, 9 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt index d4bc4f1..b0d8bb0 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -3,6 +3,7 @@ Sun Sep 19 12:29:06 CEST 2010 - v0.7-pre-1 * No VERSIONUPDATE on pwgrep, pwfls, pwfcat anymore * Introduced new command pwupdate which will check out the newest version from the repository. +* Introduced new command pwhelp which prints out a help screen Tue Sep 7 20:41:04 CEST 2010 - v0.6 release branched @@ -18,16 +18,17 @@ # ./pwgrep.sh # # For more reasonable commands the following symlinks are recommended: -# ln -s ~/svn/pwgrep/v?.?/pwgrep.sh ~/bin/pwgrep +# ln -s ~/svn/pwgrep/v?.?/pwgrep.sh ~/bin/fwipe +# ln -s ~/svn/pwgrep/v?.?/pwgrep.sh ~/bin/pwdbls # ln -s ~/svn/pwgrep/v?.?/pwgrep.sh ~/bin/pwedit -# ln -s ~/svn/pwgrep/v?.?/pwgrep.sh ~/bin/pwupdate -# ln -s ~/svn/pwgrep/v?.?/pwgrep.sh ~/bin/pwfls -# ln -s ~/svn/pwgrep/v?.?/pwgrep.sh ~/bin/pwfcat # ln -s ~/svn/pwgrep/v?.?/pwgrep.sh ~/bin/pwfadd +# ln -s ~/svn/pwgrep/v?.?/pwgrep.sh ~/bin/pwfcat # ln -s ~/svn/pwgrep/v?.?/pwgrep.sh ~/bin/pwfdel -# ln -s ~/svn/pwgrep/v?.?/pwgrep.sh ~/bin/fwipe -# ln -s ~/svn/pwgrep/v?.?/pwgrep.sh ~/bin/pwdbls +# ln -s ~/svn/pwgrep/v?.?/pwgrep.sh ~/bin/pwfls +# ln -s ~/svn/pwgrep/v?.?/pwgrep.sh ~/bin/pwgrep +# ln -s ~/svn/pwgrep/v?.?/pwgrep.sh ~/bin/pwhelp # ln -s ~/svn/pwgrep/v?.?/pwgrep.sh ~/bin/pwldb +# ln -s ~/svn/pwgrep/v?.?/pwgrep.sh ~/bin/pwupdate # Replace ?.? with the version of pwgrep you want to use. Your PATH variable # should also include ~/bin then. @@ -153,6 +154,7 @@ function pwupdate () { $VERSIONUPDATE 2>&1 >/dev/null fi } + function pwedit () { pwupdate cp -vp $PWGREPDB $PWGREPDB.`date +'%s'`.snap && \ @@ -233,6 +235,25 @@ function fwipe () { $WIPE $CWD/$1 } +function pwhelp () { + info Possible operations are: +cat <<END + fwipe <FILE> - Wiping a file + pwdbls - Listing available DBs + pwedit [OPTS] - Editing current DB + pwfadd - Adding a file to FDB + pwfcat <NAME> - Printing a file from FDB to stdout + pwfdel <NAME> - Deleting a file from FDB + pwgrep [OPTS] <REGEX> - Grepping current DB + pwldb - Synonym for pwdbls + pwupdate - Updating FDB and all DBs + pwhelp - Printing this help screen +Where OPTS are: + -o - Offline mode + -d <DB NAME> - Using a specific DB +END +} + setawkcmd setsedcmd setwipecmd @@ -240,7 +261,6 @@ setwipecmd BASENAME=`basename $0` ARGS=$@ - function set_opts () { case $ARGS in -o*) @@ -264,7 +284,6 @@ set_opts $ARGS case $BASENAME in pwgrep) - NOVERSIONING=1 pwgrep $ARGS ;; pwupdate) @@ -295,6 +314,6 @@ case $BASENAME in fwipe $ARGS ;; *) - error No such operation $basename + pwhelp esac |
