diff --git a/functions/gpg_functions.sh b/functions/gpg_functions.sh index ba0ad0503..267c40105 100644 --- a/functions/gpg_functions.sh +++ b/functions/gpg_functions.sh @@ -2,7 +2,9 @@ function gpg-encrypt-dir() { dirname=$1 + echo "Encrypting..." tar -cz "$dirname" | gpg --symmetric --output "$dirname.tar.gz.gpg" + echo "Done." } @@ -14,7 +16,27 @@ function gpg-decrypt-dir() { echo "Output directory, $outdir, already exists and will be overwritten by this command. Aborting..." exit 1 else + echo "Decrypting..." gpg --decrypt $dirname | tar -xv + echo "Done." fi } + + +# WIP +function gpg-encrypt-file() { + filename=$1 + echo "Encrypting..." + gpg --symmetric $filename + echo "Done." +} + + +# WIP +function gpg-decrypt-file() { + filename=$1 + echo "Decrypting..." + gpg --decrypt $filename >"${filename%.gpg}" + echo "Done." +}