/bin/twn: support run command for --target=web
This commit is contained in:
parent
98d7d76a42
commit
a223506a5f
11
bin/twn
11
bin/twn
@ -11,7 +11,16 @@ case "$1" in
|
||||
build ) "$toolpath"/twnbuild "${@:2}"
|
||||
;;
|
||||
|
||||
run ) $0 build "${@:2}" && ./$exe
|
||||
run ) $0 build "${@:2}"
|
||||
if [[ "$*" == *"--target=web"* ]]; then
|
||||
if [ "$OS" = "Windows_NT" ]; then
|
||||
explorer "http://0.0.0.0:8000/$exe.html" & python3 -m http.server
|
||||
else
|
||||
xdg-open "http://0.0.0.0:8000/$exe.html" & python3 -m http.server
|
||||
fi
|
||||
else
|
||||
./$exe
|
||||
fi
|
||||
;;
|
||||
|
||||
gdb ) unset DEBUGINFOD_URLS
|
||||
|
Loading…
Reference in New Issue
Block a user