aboutsummaryrefslogtreecommitdiff
path: root/src/nix/utils.sh
diff options
context:
space:
mode:
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