Rename filter scripts
This commit is contained in:
parent
75b065de25
commit
492fa394d6
@ -1,11 +1,6 @@
|
||||
#!/bin/bash
|
||||
# Takes one file path as input
|
||||
# Outputs to a new file named `$1.enc`
|
||||
|
||||
# if [ "$#" -ne 1 ]; then
|
||||
# echo "Usage: $0 <file_path>"
|
||||
# exit 1
|
||||
# fi
|
||||
# Takes input on stdin
|
||||
# Outputs to stdout
|
||||
|
||||
# Set age directory and default recipients
|
||||
AGE_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd)
|
||||
@ -19,8 +14,4 @@ if [[ -f $HOST_AGE_PUBKEY ]]; then
|
||||
SOPS_AGE_RECIPIENTS="$SOPS_AGE_RECIPIENTS,$(<$HOST_AGE_PUBKEY)"
|
||||
fi
|
||||
|
||||
FILE_EXT=${FILE_PATH##*.}
|
||||
FILE_NAME=${FILE_PATH%%.*}
|
||||
OUTPUT_FILE="$FILE_NAME.enc.$FILE_EXT"
|
||||
|
||||
sops --encrypt --age ${SOPS_AGE_RECIPIENTS} -i $FILE_PATH
|
||||
sops --encrypt --age ${SOPS_AGE_RECIPIENTS} /dev/fd/3
|
Loading…
x
Reference in New Issue
Block a user