Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed Jun 24, 2022
1 parent 2a8a5d7 commit b41579f
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions bin/decrypt-secret-key.sh
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
#!/bin/bash

VERSION="1.0.2"
VERSION="1.0.3"
THIS=$(basename $0)

FILE=$1
if [[ ! -z $FILE ]] && [[ ! -r $FILE ]]
if [ -z $FILE ]
then
FILE="access_key.yml"
fi

if [ ! -r $FILE ]
then
echo "* access key file $FILE not found or unreadable"
exit 1
else
FILE="access_key.yml"
if [[ ! -r $FILE ]]
then
echo "* access key file $FILE not found or unreadable"
exit 1
fi
fi

K=$( grep ^access_secret_key_encrypted access_key.yml|sed -e 's/^.*: *//' | base64 --decode | (gpg --batch --decrypt 2> /dev/null) )
K=$( grep ^access_secret_key_encrypted $FILE | sed -e 's/^.*: *//' | base64 --decode | (gpg --batch --decrypt 2> /dev/null) )
status=$?

if [ $status != 0 ]
Expand Down

0 comments on commit b41579f

Please sign in to comment.