Skip to content

Commit

Permalink
feat: ensure that GPG commands assume yes
Browse files Browse the repository at this point in the history
  • Loading branch information
sanjayankur31 committed May 3, 2022
1 parent 42ac259 commit 058e24c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions calliope.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

VERSION=1.2.2
VERSION=1.2.3
MY_EDITOR="vimx --servername $(pwgen 8 1)"
MY_VIEWER="xdg-open"
year=$(date +%G)
Expand Down Expand Up @@ -209,7 +209,7 @@ encrypt ()
if [ -f "$1" ]
then
echo "Encrypting $1 with $encryptionId"
$GPG_COMMAND --batch --encrypt --sign -r "$encryptionId" "$1" && rm "$1" -f || exit -1
$GPG_COMMAND --batch --yes --encrypt --sign -r "$encryptionId" "$1" && rm "$1" -f || exit -1
else
echo "File $1 not found"
exit 1
Expand Down Expand Up @@ -254,7 +254,7 @@ decrypt ()
then
echo "Decrypting $1 with $encryptionId"
nongpgfname="$(basename $1 .gpg)"
$GPG_COMMAND --batch --decrypt $1 > "$nongpgfname"
$GPG_COMMAND --batch --yes --decrypt $1 > "$nongpgfname"

else
echo "File is not a GPG encrypted file. Doing nothing."
Expand Down

0 comments on commit 058e24c

Please sign in to comment.