summaryrefslogtreecommitdiffstats
path: root/bin/gpg-sign
blob: 561e65408ba0e299cf0761eb033ca0f549820879 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh

set -e

for FILE in $(find . -maxdepth 1 -mindepth 1 -type f -and -not -name "*.sha512" -and -not -name "*.sig")
do
	if [ -e "${FILE}" ] && [ ! -e "${FILE}.sig" ]
	then
		echo "${FILE}"
		gpg --armor -b "${FILE}"
		mv "${FILE}".asc "${FILE}.sig"
		touch -r "${FILE}" "${FILE}.sig"
	fi
done