#!/usr/bin/env bash
#
# Find secrets.
#

# Load functions
LIB="`dirname $0`/../functions"
source "$LIB" maintenance $* || 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"
