Skip to content

Commit

Permalink
Add -x flag to install OCaml, findlib, odb.ml, oasis. Closes issue #10
Browse files Browse the repository at this point in the history
  • Loading branch information
hcarty committed Sep 25, 2012
1 parent 20e84fa commit 89b7d73
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -55,6 +55,7 @@ ocamlbrew can be configured with several environment variables.
-a Install everything with no prompts
-o Install OCaml only, no prompts
-f Install OCaml, findlib and odb.ml only, no prompts
-x Install OCaml, findlib, odb.ml, oasis, no prompts
-s [path] Install OCaml from Subversion [path]
-t Install OCaml from Subversion trunk
-n [name] Install under $OCAMLBREW_BASE/[name]
Expand Down
12 changes: 11 additions & 1 deletion ocamlbrew
Expand Up @@ -20,6 +20,7 @@ function help_then_exit() {
echo "-a Install everything with no prompts"
echo "-o Install OCaml only, no prompts"
echo "-f Install OCaml, findlib and odb.ml only, no prompts"
echo "-x Install OCaml, findlib, odb.ml, oasis, no prompts"
echo "-s [path] Install OCaml from Subversion [path]"
echo "-t Install OCaml from Subversion trunk"
echo "-n [name] Install under \$OCAMLBREW_BASE/[name]"
Expand Down Expand Up @@ -88,6 +89,7 @@ function init_variables() {
: ${INSTALL_ALL="false"}
: ${INSTALL_OCAML_ONLY="false"}
: ${INSTALL_OCAML_FINDLIB_ONLY="false"}
: ${INSTALL_OASIS_ONLY="false"}
: ${OCAMLBREW_INSTALL_SVN="false"}

# Set configuration options such as installation and build locations here
Expand Down Expand Up @@ -135,7 +137,7 @@ function init_variables() {
# Handle command line arguments
#
function parse_opts() {
while getopts "hb:c:p:aofs:tn:" OPTION; do
while getopts "hb:c:p:aofxs:tn:" OPTION; do
case $OPTION in
h)
help_then_exit ;;
Expand All @@ -157,6 +159,9 @@ function parse_opts() {
f)
INSTALL_OCAML_FINDLIB_ONLY="true"
;;
x)
INSTALL_OASIS_ONLY="true"
;;
s)
OCAMLBREW_INSTALL_SVN="true"
OCAMLBREW_SVN_PATH="$OPTARG"
Expand Down Expand Up @@ -213,6 +218,11 @@ function greet() {
SHOW_CONTINUE_PROMPT="false"
FINDLIB_INSTALL="true"
ODB_INSTALL="true"
elif [ "$INSTALL_OASIS_ONLY" = "true" ]; then
SHOW_CONTINUE_PROMPT="false"
FINDLIB_INSTALL="true"
ODB_INSTALL="true"
OASIS_INSTALL="true"
else
# Ask the user what components they would like to install
prompt "Would you like to install findlib? (y/n) "
Expand Down

0 comments on commit 89b7d73

Please sign in to comment.