Housekeeping
- Update README - Run shellcheck on .sh files - Add helper scripts - Remove eirene vm variant - Add post-install checklist Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -1,21 +1,21 @@
|
||||
for dir in "$HOME"/.config/sops-nix/secrets/gpg-agent/*; do
|
||||
keyfile="$dir/key"
|
||||
passfile="$dir/pass"
|
||||
for dir in "${HOME}"/.config/sops-nix/secrets/gpg-agent/*; do
|
||||
keyfile="${dir}/key"
|
||||
passfile="${dir}/pass"
|
||||
|
||||
if [ ! -f "$keyfile" ]; then
|
||||
if [[ ! -f "${keyfile}" ]]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
if [ -f "$passfile" ]; then
|
||||
gpg2 --batch --yes --pinentry-mode loopback --passphrase-file "$passfile" --import "$keyfile"
|
||||
if [[ -f "${passfile}" ]]; then
|
||||
gpg2 --batch --yes --pinentry-mode loopback --passphrase-file "${passfile}" --import "${keyfile}"
|
||||
else
|
||||
gpg2 --batch --yes --import "$keyfile"
|
||||
gpg2 --batch --yes --import "${keyfile}"
|
||||
fi
|
||||
|
||||
gpg2 --with-colons --import-options show-only --import "$keyfile" | grep '^fpr' | cut -d: -f10 | while read -r KEY_ID; do
|
||||
echo "$KEY_ID:6:" >> "$GNUPGHOME"/otrust.txt
|
||||
gpg2 --with-colons --import-options show-only --import "${keyfile}" | grep '^fpr' | cut -d: -f10 | while read -r KEY_ID; do
|
||||
echo "${KEY_ID}:6:" >> "${GNUPGHOME}"/otrust.txt
|
||||
done
|
||||
done
|
||||
|
||||
gpg2 --import-ownertrust "$GNUPGHOME"/otrust.txt
|
||||
rm "$GNUPGHOME"/otrust.txt
|
||||
gpg2 --import-ownertrust "${GNUPGHOME}"/otrust.txt
|
||||
rm "${GNUPGHOME}"/otrust.txt
|
||||
|
Reference in New Issue
Block a user