mirror of
https://github.com/avatao-content/test-tutorial-framework
synced 2025-07-03 00:46:24 +00:00
Integrate old bootstrap_tfw_dev.sh into tfw.sh
This commit is contained in:
@ -3,9 +3,9 @@ set -eu
|
||||
set -o pipefail
|
||||
set -o errtrace
|
||||
shopt -s expand_aliases
|
||||
[ "$(uname)" == "Darwin" ] && alias readlink="greadlink" || :
|
||||
[ "$(uname)" == "Darwin" ] && alias readlink="greadlink" && alias sed="gsed" || :
|
||||
|
||||
SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
|
||||
SCRIPT_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
|
||||
TFW_PATH="${TFW_PATH:-$SCRIPT_DIR/../..}"
|
||||
|
||||
BASEIMAGE_REPO="${BASEIMAGE_REPO:-baseimage-tutorial-framework}"
|
||||
@ -19,6 +19,7 @@ FRONTEND_PATH="${TFW_PATH}/${FRONTEND_REPO}"
|
||||
source "${SCRIPT_DIR}/libhack/baseimage.sh"
|
||||
source "${SCRIPT_DIR}/libhack/challenge.sh"
|
||||
source "${SCRIPT_DIR}/libhack/frontend.sh"
|
||||
source "${SCRIPT_DIR}/libhack/bootstrap.sh"
|
||||
|
||||
|
||||
start_challenge_and_frontend() {
|
||||
@ -31,6 +32,9 @@ start_challenge_and_frontend() {
|
||||
}
|
||||
|
||||
case ${1:-} in
|
||||
bootstrap)
|
||||
bootstrap::run
|
||||
;;
|
||||
start)
|
||||
baseimage::build_if_exists
|
||||
BUILD=1 RUN_FRONTEND=1 start_challenge_and_frontend ${@:2}
|
||||
@ -71,6 +75,7 @@ case ${1:-} in
|
||||
;;
|
||||
*)
|
||||
echo "Usage: tfw.sh [COMMAND]"
|
||||
echo " |--- bootstrap: setup TFW development environment"
|
||||
echo " |--- start: build & run TFW challenge and Angular frontend"
|
||||
echo " |--- run: run TFW challenge and Angular frontend"
|
||||
echo " |--- startcontainer: build & run TFW challenge, container only"
|
||||
|
Reference in New Issue
Block a user