/bin/twn: support run command for --target=web
This commit is contained in:
1 parent
98d7d76a42
commit
a223506a5f
1 file changed
+10
-1
@@ -11,7 +11,16 @@ case "$1" in
|
|||||||
build ) "$toolpath"/twnbuild "${@:2}"
|
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
|
gdb ) unset DEBUGINFOD_URLS
|
||||||
|
|||||||
Reference in new issue
Block a user