more clarity re: run.sh behavior

This commit is contained in:
Michael Bradley, Jr 2018-08-02 19:55:54 -05:00
parent 964210adda
commit 2efd3648d8
2 changed files with 6 additions and 2 deletions

View File

@ -17,8 +17,11 @@ the docker host's `$PWD`.
[`run.sh`](https://github.com/embark-framework/embark-docker/blob/master/run.sh) [`run.sh`](https://github.com/embark-framework/embark-docker/blob/master/run.sh)
is a Bash script that simplifies usage of the embark container: publishing is a Bash script that simplifies usage of the embark container: publishing
ports, bind mounting a host volume, and so on. The script exports a shell ports, bind mounting a host volume, and so on.
function named `run_embark`.
When sourced, `run.sh` makes available a shell function named
`run_embark`. When `run.sh` is invoked directly, the script forwards its
arguments to the `run_embark` shell function.
Many aspects of `run_embark`'s behavior can be overridden with environment Many aspects of `run_embark`'s behavior can be overridden with environment
variables, and that approach can be (optionally) combined with `docker build`. variables, and that approach can be (optionally) combined with `docker build`.

1
run.sh
View File

@ -174,6 +174,7 @@ SCRIPT
fi fi
fi fi
} }
export -f run_embark
if [[ "$0" = "$BASH_SOURCE" ]]; then if [[ "$0" = "$BASH_SOURCE" ]]; then
run_embark "$@" run_embark "$@"