summaryrefslogtreecommitdiff
path: root/launch.sh
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2023-10-04 22:32:34 +0800
committerlittleblack111 <littleblack11111@gmail.com>2023-10-04 22:32:34 +0800
commit914c855691637764ea58723c9246d5daf5e3e329 (patch)
tree974896821103e5da6b05fe68ae8693ce8bf74ea1 /launch.sh
parent36e9fbac37f8492783fd88a5afdf698355679d1c (diff)
new image
Diffstat (limited to 'launch.sh')
-rwxr-xr-xlaunch.sh36
1 files changed, 27 insertions, 9 deletions
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
+
+