Skip to content

Commit

Permalink
Improve shell hygiene
Browse files Browse the repository at this point in the history
  • Loading branch information
nibalizer committed Jul 12, 2016
1 parent 2f5ace3 commit 70d32ca
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ to decrypt:


```
bin/decrypt_credentials.sh
./bin/decrypt_credentials.sh
```


Expand Down
14 changes: 6 additions & 8 deletions bin/encrypt_credentials.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@ set -eu

rm puppet_credentials.asc

recipients=""
for recp in `cat recipients.txt`
do
echo "--recipient ${recp}"
recipients="${recipients} --recipient ${recp}"
gpg --recv-keys ${recp}
done
while read -r recp; do
echo "--recipient ${recp}"
recipients="${recipients} --recipient ${recp}"
gpg --recv-keys "${recp}"
done < recipients.txt

gpg --sign --encrypt --armor $recipients puppet_credentials
gpg --sign --encrypt --armor "${recipients}" puppet_credentials

0 comments on commit 70d32ca

Please sign in to comment.