changed two instances of gpg to gpg2

This commit is contained in:
Vera Lewis
2025-09-04 22:26:01 -05:00
parent 771ed9c4c3
commit 72ae650e24

4
vns
View File

@@ -117,7 +117,7 @@ vns_reencrypt () {
# Find all notes and re-encrypt them # Find all notes and re-encrypt them
find "${VNS_STORE}" -name "*.gpg" | while read -r FILE; do\ find "${VNS_STORE}" -name "*.gpg" | while read -r FILE; do\
gpg --batch --decrypt "$FILE" 2>/dev/null | gpg --batch "${GPG_RECIPS[@]}" --encrypt --output "${FILE}_new".gpg >/dev/null 2>&1 gpg2 --batch --decrypt "$FILE" 2>/dev/null | gpg --batch "${GPG_RECIPS[@]}" --encrypt --output "${FILE}_new".gpg >/dev/null 2>&1
mv "${FILE}_new.gpg" "$FILE"; mv "${FILE}_new.gpg" "$FILE";
done done
@@ -324,7 +324,7 @@ vns_import () {
mkdir -p "$VNS_STORE/$(dirname "$2.gpg")" mkdir -p "$VNS_STORE/$(dirname "$2.gpg")"
if [ "${1##*.}" == "gpg" ]; then if [ "${1##*.}" == "gpg" ]; then
gpg --batch --decrypt "$1" | gpg2 --batch "$(vns_gpgid)" -o "$VNS_STORE/$2.gpg" --encrypt gpg2 --batch --decrypt "$1" | gpg2 --batch "$(vns_gpgid)" -o "$VNS_STORE/$2.gpg" --encrypt
else else
gpg2 --batch "$(vns_gpgid)" -o "$VNS_STORE/$2.gpg" --encrypt "$1" gpg2 --batch "$(vns_gpgid)" -o "$VNS_STORE/$2.gpg" --encrypt "$1"
fi fi