15
abra
15
abra
@ -390,6 +390,13 @@ fi
|
||||
|
||||
###### Safety checks
|
||||
|
||||
require_bash_4() {
|
||||
# we're using things like `mapfile` which require bash 4+
|
||||
if ! bash -c '[[ $BASH_VERSION > 4.0 ]]'; then
|
||||
error "bash version '$BASH_VERSION' is too old, 4 or newer required"
|
||||
fi
|
||||
}
|
||||
|
||||
require_pwqgen() {
|
||||
if ! type pwqgen > /dev/null 2>&1; then
|
||||
error "pwqgen program is not installed"
|
||||
@ -406,12 +413,6 @@ require_abra_dir() {
|
||||
mkdir -p "$ABRA_DIR"
|
||||
}
|
||||
|
||||
require_stack() {
|
||||
if [ -z "$STACK_NAME" ]; then
|
||||
error "no stack_name, export \$STACK_NAME=my_cool_app"
|
||||
fi
|
||||
}
|
||||
|
||||
require_app_latest() {
|
||||
APP="$1"
|
||||
APP_DIR="$ABRA_DIR/apps/$APP"
|
||||
@ -1634,6 +1635,8 @@ sub_network() {
|
||||
#######################################
|
||||
|
||||
abra() {
|
||||
require_bash_4
|
||||
|
||||
# TODO (3wc): we either need to do this, or add 'shellcheck disable' all over
|
||||
# the place to handle the dynamically-defined vars
|
||||
declare abra___stack abra___env abra__command_ abra__args_ \
|
||||
|
Reference in New Issue
Block a user