Commit 14e748d9 authored by Andres Löh's avatar Andres Löh
Browse files

bootstrap with --global should still respect $PREFIX

Thanks to milkypostman for providing the patch. Closes ticket #926.
parent 1eb87af7
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
# It expects to be run inside the cabal-install directory. # It expects to be run inside the cabal-install directory.
# install settings, you can override these by setting environment vars # install settings, you can override these by setting environment vars
PREFIX=${PREFIX:-${HOME}/.cabal}
#VERBOSE #VERBOSE
#EXTRA_CONFIGURE_OPTS #EXTRA_CONFIGURE_OPTS
...@@ -20,6 +19,7 @@ FETCH=${FETCH:-fetch} ...@@ -20,6 +19,7 @@ FETCH=${FETCH:-fetch}
TAR=${TAR:-tar} TAR=${TAR:-tar}
GUNZIP=${GUNZIP:-gunzip} GUNZIP=${GUNZIP:-gunzip}
SCOPE_OF_INSTALLATION="--user" SCOPE_OF_INSTALLATION="--user"
DEFAULT_PREFIX="${HOME}/.cabal"
for arg in $* for arg in $*
...@@ -30,7 +30,7 @@ do ...@@ -30,7 +30,7 @@ do
shift;; shift;;
"--global") "--global")
SCOPE_OF_INSTALLATION=${arg} SCOPE_OF_INSTALLATION=${arg}
PREFIX="/usr/local" DEFAULT_PREFIX="/usr/local"
shift;; shift;;
*) *)
echo "Unknown argument or option, quitting: ${arg}" echo "Unknown argument or option, quitting: ${arg}"
...@@ -43,6 +43,7 @@ do ...@@ -43,6 +43,7 @@ do
esac esac
done done
PREFIX=${PREFIX:-${DEFAULT_PREFIX}}
# Versions of the packages to install. # Versions of the packages to install.
# The version regex says what existing installed versions are ok. # The version regex says what existing installed versions are ok.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment