From 914c855691637764ea58723c9246d5daf5e3e329 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Wed, 4 Oct 2023 22:32:34 +0800 Subject: new image --- launch.sh | 36 +++++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-) (limited to 'launch.sh') diff --git a/launch.sh b/launch.sh index 9b02a8ea..d14f143a 100755 --- a/launch.sh +++ b/launch.sh @@ -1,9 +1,27 @@ -printf '\033[0;35mCode Checking Starts...\033[0m\n' -html5validator --also-check-css --also-check-svg --verbose | npx gnomon || printf '\033[0;31mCode Check Failed...\033[0m\n' -# sleep .5 -echo -htmltest --conf ./.htmltest.yml | npx gnomon || printf '\033[0;31mCode Check Failed...\033[0m\n' -# sleep .5 -printf '\033[0;32mNpx Server Starting...\033[0m\n' - -exec npx serve -d -p 209 #| npx gnomon; +function selfcheck() { + printf '\033[0;35mCode Checking Starts...\033[0m\n' + html5validator --also-check-css --also-check-svg --verbose | npx gnomon || printf '\033[0;31mCode Check Failed...\033[0m\n' + # sleep .5 + echo + htmltest --conf ./.htmltest.yml | npx gnomon || printf '\033[0;31mCode Check Failed...\033[0m\n' + # sleep .5 +} + +function start() { + printf '\033[0;32mNpx Server Starting...\033[0m\n' + exec npx serve -d -p 209 #| npx gnomon; +} + +function main() { + selfcheck + start +} + +if [ "$1" ]; then + $@ + exit 0 +fi + +main + + -- cgit v1.2.3