aboutsummaryrefslogtreecommitdiffstats
path: root/gnupg/encrypt-nosign
blob: c4446b18406bb78ace855f34f59a01f3af14501c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
#!/bin/dash
if test -z "${GPG_KEY}"; then
	printf '\033[1;31m%s\033[0m\n' 'You must export GPG_KEY with you GPG key' >&2
	exec 1
else
	for file in "$@"; do
		gpg --encrypt -r "${GPG_KEY}" < "${file}" > "${file}.crypt"
	done
	printf '\033[1;34m%s\033[0m\n' '-- Do not forget to shred. --' >&2
fi