Jafner.net/.age-encrypt.sh
Joey Hafner 9ca38bd52c
#2 Replace Docker secrets with encrypted secrets.env file
Add encrypt and decrypt scripts
Add pubkeys file with desktop and fighter pubkeys
2024-08-13 23:34:15 -07:00

10 lines
274 B
Bash
Executable File

#!/bin/bash
# Takes one file path as input
# Outputs to a new file named `$1.enc`
input_file=$1
file_extension=${input_file##*.}
file_name=${input_file%%.*}
output_file="$file_name.enc.$file_extension"
sops --encrypt --age ${SOPS_AGE_RECIPIENTS} $input_file > $output_file