From 448cc10ed239c95381c2b4ab7fa3b4c98965aed3 Mon Sep 17 00:00:00 2001
From: Jake Wheat <jakewheatmail@gmail.com>
Date: Sun, 28 Sep 2014 21:29:53 +0300
Subject: [PATCH] bootstrap.sh: add comments on SCOPE_OF_INSTALLATION for
 custom package database install

---
 cabal-install/bootstrap.sh | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/cabal-install/bootstrap.sh b/cabal-install/bootstrap.sh
index 28dc67b5c3..6c0e2ee00d 100755
--- a/cabal-install/bootstrap.sh
+++ b/cabal-install/bootstrap.sh
@@ -28,6 +28,20 @@ CURL="${CURL:-curl}"
 FETCH="${FETCH:-fetch}"
 TAR="${TAR:-tar}"
 GZIP_PROGRAM="${GZIP_PROGRAM:-gzip}"
+
+# SCOPE_OF_INSTALLATION can be set on the command line to use/install
+# the libaries needed to build cabal-install to a custom package
+# database instead of the user or global package database
+# e.g.
+# ghc-pkg init /my/package/database
+# SCOPE_OF_INSTALLATION=/my/package/database ./bootstrap.sh
+#
+# you can use this with PREFIX also, e.g.
+# ghc-pkg init /my/prefix/packages.conf.d
+# PREFIX=/my/prefix SCOPE_OF_INSTALLATION=/my/prefix/packages.conf.d ./bootstrap.sh
+#
+# if you use the --global or --user arguments, this will override the
+# SCOPE_OF_INSTALLATION and not use a custom package database
 SCOPE_OF_INSTALLATION="${SCOPE_OF_INSTALLATION:---user}"
 DEFAULT_PREFIX="${HOME}/.cabal"
 
-- 
GitLab