From 7e3e6e53ff8191734b926915add10483b1f8665e Mon Sep 17 00:00:00 2001 From: Robin Schneider Date: Thu, 16 Mar 2017 22:58:53 +0100 Subject: [PATCH] Use ASDF_DIR environment variable if available Related to: https://github.com/asdf-vm/asdf/pull/156 --- README.md | 2 +- bin/install | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c4e9b0a..b399d71 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ The `gpg` commands above imports the OpenPGP public keys in your main OpenPGP ke To use a dedicated keyring, prepare the dedicated keyring and set it as the default keyring in the current shell: ```bash -export GNUPGHOME="$HOME/.asdf/keyrings/nodejs" && mkdir -p "$GNUPGHOME" && chmod 0700 "$GNUPGHOME" +export GNUPGHOME="${ASDF_DIR:-$HOME/.asdf}/keyrings/nodejs" && mkdir -p "$GNUPGHOME" && chmod 0700 "$GNUPGHOME" # Imports Node.js release team's OpenPGP keys to the keyring bash ~/.asdf/plugins/nodejs/bin/import-release-team-keyring diff --git a/bin/install b/bin/install index eb2bb6a..5190fa6 100755 --- a/bin/install +++ b/bin/install @@ -168,8 +168,8 @@ download_and_verify_checksums() { fi ( - if [ -z "${GNUPGHOME:-}" ] && [ -d "$HOME/.asdf/keyrings/nodejs" ]; then - export GNUPGHOME="$HOME/.asdf/keyrings/nodejs" + if [ -z "${GNUPGHOME:-}" ] && [ -d "${ASDF_DIR:-$HOME/.asdf}/keyrings/nodejs" ]; then + export GNUPGHOME="${ASDF_DIR:-$HOME/.asdf}/keyrings/nodejs" fi if ! $gnugp_verify_command_name --verify "$signed_checksum_file"; then