Permalink
Browse files

Add -x flag to install OCaml, findlib, odb.ml, oasis. Closes issue #10

  • Loading branch information...
1 parent 20e84fa commit 89b7d738d8558ec9f2a695522f92e2ccf40fef5e @hcarty committed Sep 25, 2012
Showing with 12 additions and 1 deletion.
  1. +1 −0 README.md
  2. +11 −1 ocamlbrew
View
@@ -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]
View
@@ -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]"
@@ -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
@@ -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 ;;
@@ -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"
@@ -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) "

0 comments on commit 89b7d73

Please sign in to comment.