diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2023-04-07 11:15:11 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2023-04-07 11:37:31 +0200 |
commit | 1a795ad9f5b8fe368a1e597c1bfb12fa112d2101 (patch) | |
tree | 447fe6ebb8a375cc06e67cff1f85c89b25bdf90c /etc/bootstrap/bbot-bootstrap.sh | |
parent | 9ad939e65513fb9d367ba039484febcd63423304 (diff) |
Add --install option to bbot bootstrap scripts
Diffstat (limited to 'etc/bootstrap/bbot-bootstrap.sh')
-rwxr-xr-x | etc/bootstrap/bbot-bootstrap.sh | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/etc/bootstrap/bbot-bootstrap.sh b/etc/bootstrap/bbot-bootstrap.sh index 495bbf1..e3231bf 100755 --- a/etc/bootstrap/bbot-bootstrap.sh +++ b/etc/bootstrap/bbot-bootstrap.sh @@ -32,6 +32,7 @@ run () # Defaults that can be changed via command line. # +install= build=/tmp environments="$HOME/environments" make= @@ -39,8 +40,19 @@ jobs= # Parse options. # +# Note that if --install is specified, any necessary --private/--sudo options +# will need to be specified as <build-options>. +# while test $# -ne 0; do case $1 in + --install) + shift + if test $# -eq 0; then + error "missing install directory after --install" + fi + install="$1" + shift + ;; --build) shift if test $# -eq 0; then @@ -84,14 +96,18 @@ done # Note: build_options is array-like (expanded unquoted). # tftp="196.254.111.222" -install="/usr/local" -build_options= verbose=3 timeout=600 +build_options= #install="/tmp/bbot-install" #tftp="127.0.0.1:55123" -#build_options="--install-dir $install" + +if test -n "$install"; then + build_options="$build_options --install-dir $install" +else + install="/usr/local" +fi # If make was specified, add it to build_options. # |