#3 Validate input is file path
This commit is contained in:
parent
afc9ef5abd
commit
0080a68f3c
@ -2,6 +2,12 @@
|
||||
# Takes file path from stdin
|
||||
# Outputs to stdout
|
||||
|
||||
if ! [[ -f $1 ]]; then
|
||||
echo "\$1 is not a file"
|
||||
echo "\$1: $1"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Set age key file path
|
||||
# If no private key exists at the expected location,
|
||||
# Create the key file at the expected location
|
||||
|
@ -2,6 +2,12 @@
|
||||
# Takes file path from stdin
|
||||
# Outputs to stdout
|
||||
|
||||
if ! [[ -f $1 ]]; then
|
||||
echo "\$1 is not a file"
|
||||
echo "\$1: $1"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Set age directory and default recipients
|
||||
AGE_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd)
|
||||
SOPS_AGE_RECIPIENTS="$(<$AGE_DIR/.age-author-pubkeys)"
|
||||
|
Loading…
x
Reference in New Issue
Block a user