aboutsummaryrefslogtreecommitdiff
path: root/src/nix/utils.sh
diff options
context:
space:
mode:
authordylhack.dev <followmelikethunder@pm.me>2023-01-24 21:28:54 +0300
committerGitHub <noreply@github.com>2023-01-24 21:28:54 +0300
commit676e824e92c7b2abe45f46c89580c96f99a8d43f (patch)
treeb824bfa381bbe3b9ca51c900d9054593e21847d4 /src/nix/utils.sh
parent3a579894a02c7eb76184cf7305d67fe3f69b789f (diff)
features/nix: remove PGP check (#414)
* nix: remove PGP check * fix issues
Diffstat (limited to 'src/nix/utils.sh')
-rwxr-xr-xsrc/nix/utils.sh35
1 files changed, 0 insertions, 35 deletions
diff --git a/src/nix/utils.sh b/src/nix/utils.sh
index 7cb55f2..f94fd3d 100755
--- a/src/nix/utils.sh
+++ b/src/nix/utils.sh
@@ -82,41 +82,6 @@ detect_user() {
fi
}
-# Import the specified key in a variable name passed in as
-receive_gpg_keys() {
- local keys=${!1}
- local keyring_args=""
- if [ ! -z "$2" ]; then
- mkdir -p "$(dirname \"$2\")"
- keyring_args="--no-default-keyring --keyring $2"
- fi
-
- # Use a temporary location for gpg keys to avoid polluting image
- export GNUPGHOME="/tmp/tmp-gnupg"
- mkdir -p ${GNUPGHOME}
- chmod 700 ${GNUPGHOME}
- echo -e "disable-ipv6\n${GPG_KEY_SERVERS}" > ${GNUPGHOME}/dirmngr.conf
- # GPG key download sometimes fails for some reason and retrying fixes it.
- local retry_count=0
- local gpg_ok="false"
- set +e
- until [ "${gpg_ok}" = "true" ] || [ "${retry_count}" -eq "5" ];
- do
- echo "(*) Downloading GPG key..."
- ( echo "${keys}" | xargs -n 1 gpg -q ${keyring_args} --recv-keys) 2>&1 && gpg_ok="true"
- if [ "${gpg_ok}" != "true" ]; then
- echo "(*) Failed getting key, retring in 10s..."
- (( retry_count++ ))
- sleep 10s
- fi
- done
- set -e
- if [ "${gpg_ok}" = "false" ]; then
- echo "(!) Failed to get gpg key."
- exit 1
- fi
-}
-
# Figure out correct version of a three part version number is not passed
find_version_from_git_tags() {
local variable_name=$1