1 2 3 4 5 6 7 8 9 10 11 12
#!/bin/sh set -e F="$(readlink -f "$1")" cd "$(dirname "$0")/.." TMP="$(mktemp)" KEY="$(gpg2 --decrypt files/keys/primary.gpg)" PASS_ENC="$KEY" openssl aes-192-cbc -e -a -pass env:PASS_ENC -in "$F" -out "$TMP" mv "$TMP" "$F"