Repository : ssh://darcs.haskell.org//srv/darcs/packages/Cabal

On branch  : 

http://hackage.haskell.org/trac/ghc/changeset/5b83a54a64d9c3d9b0aef782afe37202db2583cb

>---------------------------------------------------------------

commit 5b83a54a64d9c3d9b0aef782afe37202db2583cb
Author: Andres Loeh <[email protected]>
Date:   Fri Mar 9 08:30:31 2012 +0000

    bootstrap with --global should still respect $PREFIX
    
    Thanks to milkypostman for providing the patch. Closes ticket #926.

>---------------------------------------------------------------

 cabal-install/bootstrap.sh |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/cabal-install/bootstrap.sh b/cabal-install/bootstrap.sh
index df1d934..30c46eb 100644
--- a/cabal-install/bootstrap.sh
+++ b/cabal-install/bootstrap.sh
@@ -7,7 +7,6 @@
 # It expects to be run inside the cabal-install directory.
 
 # install settings, you can override these by setting environment vars
-PREFIX=${PREFIX:-${HOME}/.cabal}
 #VERBOSE
 #EXTRA_CONFIGURE_OPTS
 
@@ -20,6 +19,7 @@ FETCH=${FETCH:-fetch}
 TAR=${TAR:-tar}
 GUNZIP=${GUNZIP:-gunzip}
 SCOPE_OF_INSTALLATION="--user"
+DEFAULT_PREFIX="${HOME}/.cabal"
 
 
 for arg in $*
@@ -30,7 +30,7 @@ do
       shift;;
     "--global")
       SCOPE_OF_INSTALLATION=${arg}
-      PREFIX="/usr/local"
+      DEFAULT_PREFIX="/usr/local"
       shift;;
     *)
       echo "Unknown argument or option, quitting: ${arg}"
@@ -43,6 +43,7 @@ do
   esac
 done
 
+PREFIX=${PREFIX:-${DEFAULT_PREFIX}}
 
 # Versions of the packages to install.
 # The version regex says what existing installed versions are ok.



_______________________________________________
Cvs-libraries mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-libraries

Reply via email to