Last active
December 22, 2015 04:59
-
-
Save Goerik/6421208 to your computer and use it in GitHub Desktop.
decrypt-C3C33F33.sh /path/to/ecnrypted/files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Params check | |
if [[ -z "$@" ]]; then | |
echo >&2 "You must supply an argument!" | |
exit 1 | |
elif [[ ! -d "$@" ]]; then | |
echo >&2 "$@ is not a valid directory!" | |
exit 1 | |
fi | |
# Decryption | |
for f in $(find $1 -name '*.gpg'); do cat ${f} | gpg --yes --recipient C3C33F33 --decrypt > ${f%.gpg}; done | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment