From 2efd3648d8c5e25501c7b437777e4942abeb85d4 Mon Sep 17 00:00:00 2001 From: "Michael Bradley, Jr" Date: Thu, 2 Aug 2018 19:55:54 -0500 Subject: [PATCH] more clarity re: run.sh behavior --- README.md | 7 +++++-- run.sh | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7767a77..c2bfa47 100644 --- a/README.md +++ b/README.md @@ -17,8 +17,11 @@ the docker host's `$PWD`. [`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 -ports, bind mounting a host volume, and so on. The script exports a shell -function named `run_embark`. +ports, bind mounting a host volume, and so on. + +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 variables, and that approach can be (optionally) combined with `docker build`. diff --git a/run.sh b/run.sh index 9781cb3..8fb90fc 100755 --- a/run.sh +++ b/run.sh @@ -174,6 +174,7 @@ SCRIPT fi fi } +export -f run_embark if [[ "$0" = "$BASH_SOURCE" ]]; then run_embark "$@"