Add support GHCUP_META_DOWNLOAD_URL and GHCUP_META_VERSION_URL, fixes #45

Allowing to overwrite .download-urls and .available-versions URLs.

Example:

  GHCUP_META_DOWNLOAD_URL=file://$(pwd)/.download-urls \
  GHCUP_META_VERSION_URL=file://$(pwd)/.available-versions \
    ./ghcup --verbose list
This commit is contained in:
Julian Ospald 2019-05-30 12:11:22 +08:00
parent 310fe03b1f
commit bcdff68d54
No known key found for this signature in database
GPG Key ID: 511B62C09D50CD28

4
ghcup
View File

@ -135,7 +135,7 @@ SCRIPT_UPDATE_URL="${BASE_DOWNLOAD_URL}/ghcup"
# DESCRIPTION:
# The url of the meta file for getting
# download information for ghc/cabal-install etc.
META_DOWNLOAD_URL="${BASE_DOWNLOAD_URL}/.download-urls"
META_DOWNLOAD_URL="${GHCUP_META_DOWNLOAD_URL:=${BASE_DOWNLOAD_URL}/.download-urls}"
# @VARIABLE: META_DOWNLOAD_FORMAT
# DESCRIPTION:
@ -148,7 +148,7 @@ META_DOWNLOAD_FORMAT="1"
# DESCRIPTION:
# The url of the meta file for getting
# available versions for ghc/cabal-install etc.
META_VERSION_URL="${BASE_DOWNLOAD_URL}/.available-versions"
META_VERSION_URL="${GHCUP_META_VERSION_URL:=${BASE_DOWNLOAD_URL}/.available-versions}"
# @VARIABLE: META_VERSION_FORMAT
# DESCRIPTION: