parent
6072ded541
commit
75e48da9a0
18
ghcup
18
ghcup
@ -58,10 +58,19 @@ VERBOSE=false
|
|||||||
# Whether to force installation and overwrite files.
|
# Whether to force installation and overwrite files.
|
||||||
FORCE=false
|
FORCE=false
|
||||||
|
|
||||||
|
# @VARIABLE: GHCUP_INSTALL_BASE_PREFIX
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# The main install directory prefix, under which .ghcup
|
||||||
|
# directory will be created. This directory is user
|
||||||
|
# configurable via the environment variable of the
|
||||||
|
# same name. It must be non-empty and the path
|
||||||
|
# it points to must exist.
|
||||||
|
: "${GHCUP_INSTALL_BASE_PREFIX:=$HOME}"
|
||||||
|
|
||||||
# @VARIABLE: INSTALL_BASE
|
# @VARIABLE: INSTALL_BASE
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# The main install directory where all ghcup stuff happens.
|
# The main install directory where all ghcup stuff happens.
|
||||||
INSTALL_BASE="$HOME/.ghcup"
|
INSTALL_BASE="$GHCUP_INSTALL_BASE_PREFIX/.ghcup"
|
||||||
|
|
||||||
# @VARIABLE: GHC_LOCATION
|
# @VARIABLE: GHC_LOCATION
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
@ -1659,10 +1668,13 @@ list() {
|
|||||||
#######################
|
#######################
|
||||||
|
|
||||||
|
|
||||||
if [ -z "$HOME" ] ; then
|
if [ -z "${GHCUP_INSTALL_BASE_PREFIX}" ] ; then
|
||||||
die "HOME env not set, cannot operate"
|
die "GHCUP_INSTALL_BASE_PREFIX empty, cannot operate"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ ! -d "${GHCUP_INSTALL_BASE_PREFIX}" ] ; then
|
||||||
|
die "${GHCUP_INSTALL_BASE_PREFIX} does not exist"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user