Skip to content

Commit

Permalink
fix: correct check for encryptionId
Browse files Browse the repository at this point in the history
  • Loading branch information
sanjayankur31 committed May 2, 2022
1 parent ced74ed commit 7fbff65
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions calliope.sh
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ compile_specific ()
# so remember to pushd/popd as required
encrypt ()
{
if [ -z ${encryptionId+x} ]
if [ -z ${encryptionId} ]
then
echo "Encryption is not enabled"
else
Expand All @@ -228,18 +228,18 @@ encrypt ()

encrypt_all ()
{
if [ -z ${encryptionId+x} ]
if [ -z ${encryptionId} ]
then
echo "Encryption is not enabled"
else
echo "Encrypting all files with $encryptionId"
find pdfs/ diary/ -type f -and -not -type l -execdir $GPG_COMMAND --encrypt --sign -r "$encryptionId" "{}" \;
find pdfs/ diary/ -type f -and -not -type l -and -not -name "*.gpg" -execdir $GPG_COMMAND --encrypt --sign -r "$encryptionId" "{}" \;
fi
}

decrypt ()
{
if [ -z ${encryptionId+x} ]
if [ -z ${encryptionId} ]
then
echo "Encryption is not enabled"
else
Expand Down Expand Up @@ -442,7 +442,7 @@ search_diary ()
remove_unencrpyted ()
{
# if encryption is enabled, delete all unencrypted pdf files before committing
if [ -z ${encryptionId+x} ]
if [ -z ${encryptionId} ]
then
echo "Encryption is not enabled"
else
Expand Down

0 comments on commit 7fbff65

Please sign in to comment.