1
0
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:
Kristóf Tóth
2018-06-19 14:23:48 +02:00
parent 0f9b5920c1
commit df285fea58
7 changed files with 171 additions and 209 deletions

View File

@ -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"