aboutsummaryrefslogtreecommitdiff
path: root/lib/keyringer/actions/find
blob: 9b18d66891ab7190054dda76ee6925b10eb30bb8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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 | grep -i "$ARGS" | sed -e 's|^./||g'
cd "$CWD"