move override-ables to the top
This commit is contained in:
parent
a1aa03db15
commit
3601291b94
34
run.sh
34
run.sh
|
@ -1,16 +1,13 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
run_embark () {
|
run_embark () {
|
||||||
local oldopts=""
|
local EMBARK_DOCKER_EXTRA_RUN_OPTS=${EMBARK_DOCKER_EXTRA_RUN_OPTS:-"-e __embark_docker_runsh"}
|
||||||
case $- in
|
local EMBARK_DOCKER_MOUNT_SOURCE=${EMBARK_DOCKER_MOUNT_DIR:-$PWD}
|
||||||
*e*) oldopts="set -e" ;;
|
local EMBARK_DOCKER_MOUNT_TARGET=${EMBARK_DOCKER_MOUNT_DIR:-/dapp}
|
||||||
*) oldopts="set +e" ;;
|
local EMBARK_DOCKER_IMAGE=${EMBARK_DOCKER_IMAGE:-statusim/embark}
|
||||||
esac
|
local EMBARK_DOCKER_RUN=${EMBARK_DOCKER_RUN}
|
||||||
if [[ $(shopt -po history) = "set -o history" ]]; then
|
local EMBARK_DOCKER_RUN_INTERACTIVE=${EMBARK_DOCKER_RUN_INTERACTIVE:-false}
|
||||||
oldopts="$oldopts; set -o history"
|
local EMBARK_DOCKER_TAG=${EMBARK_DOCKER_TAG:-latest}
|
||||||
fi
|
|
||||||
set +e
|
|
||||||
set +o history
|
|
||||||
|
|
||||||
local txtbld=$(tput bold)
|
local txtbld=$(tput bold)
|
||||||
local txtrst=$(tput sgr0)
|
local txtrst=$(tput sgr0)
|
||||||
|
@ -23,6 +20,17 @@ run_embark () {
|
||||||
local INFO=${bldcyn}INFO${txtrst}
|
local INFO=${bldcyn}INFO${txtrst}
|
||||||
local WARNING=${bldylw}WARNING${txtrst}
|
local WARNING=${bldylw}WARNING${txtrst}
|
||||||
|
|
||||||
|
local oldopts=""
|
||||||
|
case $- in
|
||||||
|
*e*) oldopts="set -e" ;;
|
||||||
|
*) oldopts="set +e" ;;
|
||||||
|
esac
|
||||||
|
if [[ $(shopt -po history) = "set -o history" ]]; then
|
||||||
|
oldopts="$oldopts; set -o history"
|
||||||
|
fi
|
||||||
|
set +e
|
||||||
|
set +o history
|
||||||
|
|
||||||
check_bash_version () {
|
check_bash_version () {
|
||||||
if [[ $BASH_VERSINFO -lt 4 ]]; then
|
if [[ $BASH_VERSINFO -lt 4 ]]; then
|
||||||
echo "$ERROR: this script requires Bash version >= 4.0"
|
echo "$ERROR: this script requires Bash version >= 4.0"
|
||||||
|
@ -62,13 +70,7 @@ run_embark () {
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local dummy="-e __embark_docker_runsh"
|
|
||||||
local EMBARK_DOCKER_EXTRA_RUN_OPTS=${EMBARK_DOCKER_EXTRA_RUN_OPTS:-$dummy}
|
|
||||||
local -a extra_run_opts=( $EMBARK_DOCKER_EXTRA_RUN_OPTS )
|
local -a extra_run_opts=( $EMBARK_DOCKER_EXTRA_RUN_OPTS )
|
||||||
local EMBARK_DOCKER_MOUNT_SOURCE=${EMBARK_DOCKER_MOUNT_DIR:-$PWD}
|
|
||||||
local EMBARK_DOCKER_MOUNT_TARGET=${EMBARK_DOCKER_MOUNT_DIR:-/dapp}
|
|
||||||
local EMBARK_DOCKER_IMAGE=${EMBARK_DOCKER_IMAGE:-statusim/embark}
|
|
||||||
local EMBARK_DOCKER_TAG=${EMBARK_DOCKER_TAG:-latest}
|
|
||||||
|
|
||||||
local -a cmd=( "$@" )
|
local -a cmd=( "$@" )
|
||||||
case $1 in
|
case $1 in
|
||||||
|
|
Loading…
Reference in New Issue