diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2013-12-26 21:56:04 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2013-12-26 21:56:04 -0200 |
commit | b95155761a1789557ea1569491d149e3c90d295b (patch) | |
tree | 3a3df3c48d7baa3fcd57ab5433a75dcb34eab4fa /lib | |
parent | 4a19a5a2db0e49846249bf4b7ce02a2c6e143626 (diff) | |
download | keyringer-b95155761a1789557ea1569491d149e3c90d295b.tar.gz keyringer-b95155761a1789557ea1569491d149e3c90d295b.tar.bz2 |
Adding 'find' action
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/keyringer/actions/find | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/keyringer/actions/find b/lib/keyringer/actions/find new file mode 100755 index 0000000..92bec25 --- /dev/null +++ b/lib/keyringer/actions/find @@ -0,0 +1,19 @@ +#!/bin/bash +# +# Find secrets. +# + +# Load functions +LIB="`dirname $0`/../functions" +source "$LIB" || exit 1 + +# Aditional parameters +CWD="`pwd`" + +# Avoid leading slash +shift +ARGS="`echo "$*" | sed -e "s|^/*||"`" + +# Run find command +cd "$KEYDIR/$RELATIVE_PATH" && find -iname "*$ARGS*" +cd "$CWD" |