diff options
author | Stefan Kreutz <mail@skreutz.com> | 2022-09-04 13:34:13 +0200 |
---|---|---|
committer | Stefan Kreutz <mail@skreutz.com> | 2022-09-04 13:34:13 +0200 |
commit | 8c8b89fa139a0d6c4c4ece8094bd1ac5c7f76243 (patch) | |
tree | 788997b4fd034c928aa188e16d3623a896496c1c | |
parent | 0eaada632e150f73b8467e571f65e42c253307c3 (diff) | |
download | shellpass-8c8b89fa139a0d6c4c4ece8094bd1ac5c7f76243.tar |
Use gpg executable instead of gpg2
The gnupg port for OpenBSD switched to version 2:
https://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/security/gnupg/distinfo?rev=1.33&content-type=text/x-cvsweb-markup
-rwxr-xr-x | shellpass.ksh | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/shellpass.ksh b/shellpass.ksh index 97aafbf..c56b9b3 100755 --- a/shellpass.ksh +++ b/shellpass.ksh @@ -34,7 +34,7 @@ function generate { # Source: https://www.vincentdelft.be/post/post_20190316) password="$( jot -r -c 20 32 127 | rs -g0 )" - echo "$password" | gpg2 --encrypt --recipient "$gpg_id" --output "$file" + echo "$password" | gpg --encrypt --recipient "$gpg_id" --output "$file" } function show { @@ -43,7 +43,7 @@ function show { fi file="$1" - gpg2 --quiet --decrypt "$file" | "${PAGER:-less}" + gpg --quiet --decrypt "$file" | "${PAGER:-less}" } function qrencode { @@ -52,7 +52,7 @@ function qrencode { fi file="$1" - gpg2 --quiet --decrypt "$file" \ + gpg --quiet --decrypt "$file" \ | head -n 1 \ | tr -d '\n' \ | ( command qrencode --type=ANSI --strict-version && echo "$file" ) \ @@ -65,7 +65,7 @@ function clip { fi file="$1" - gpg2 --quiet --decrypt "$file" \ + gpg --quiet --decrypt "$file" \ | head -n 1 \ | nohup xclip -selection clipboard -rmlastnl -loops 1 -silent >/dev/null 2>&1 } @@ -88,7 +88,7 @@ function edit { if [[ ! -e "$file" ]]; then touch "$plaintext" else - gpg2 --quiet --decrypt "$file" >"$plaintext" + gpg --quiet --decrypt "$file" >"$plaintext" fi # Ignore EDITOR and VISUAL to guard against automatically created @@ -97,7 +97,7 @@ function edit { # CAVEAT: Cannot disable vi(1)'s recdir without provoking a prompt. NEXINIT="set backup=" /usr/bin/vi "$plaintext" - gpg2 --quiet --encrypt --recipient "$gpg_id" --output - <"$plaintext" >"$encrypted" + gpg --quiet --encrypt --recipient "$gpg_id" --output - <"$plaintext" >"$encrypted" rm "$plaintext" mv "$encrypted" "$file" } |