mirror of
https://github.com/Mic92/sops-nix.git
synced 2024-12-14 11:57:52 +00:00
Merge pull request #241 from SuperSandro2000/patch-1
Remove unused code
This commit is contained in:
commit
486b4455da
1 changed files with 2 additions and 10 deletions
|
@ -1,11 +1,3 @@
|
|||
_sopsAddKey() {
|
||||
@gpg@ --quiet --import "$key"
|
||||
local fpr
|
||||
# only add the first fingerprint, this way we ignore subkeys
|
||||
fpr=$(@gpg@ --with-fingerprint --with-colons --show-key "$key" \
|
||||
| awk -F: '$1 == "fpr" { print $10; exit }')
|
||||
}
|
||||
|
||||
sopsImportKeysHook() {
|
||||
local key dir
|
||||
if [ -n "${sopsCreateGPGHome}" ]; then
|
||||
|
@ -14,14 +6,14 @@ sopsImportKeysHook() {
|
|||
fi
|
||||
for key in ${sopsPGPKeys-}; do
|
||||
if [[ -f "$key" ]]; then
|
||||
_sopsAddKey "$key"
|
||||
@gpg@ --quiet --import "$key"
|
||||
else
|
||||
echo "$key does not exists" >&2
|
||||
fi
|
||||
done
|
||||
for dir in ${sopsPGPKeyDirs-}; do
|
||||
while IFS= read -r -d '' key; do
|
||||
_sopsAddKey "$key"
|
||||
@gpg@ --quiet --import "$key"
|
||||
done < <(find -L "$dir" -type f \( -name '*.gpg' -o -name '*.asc' \) -print0)
|
||||
done
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue