diff --git a/web/bind.sh b/web/bind.sh index 394fda3..21dafe6 100755 --- a/web/bind.sh +++ b/web/bind.sh @@ -5,14 +5,16 @@ read -p "Enter URL: " URL # Expose URL to environment -export ECO2D_SERVER_URL=${URL/https:\/\//}run_web +export ECO2D_SERVER_URL=${URL/https:\/\//}build_web echo ${ECO2D_SERVER_URL} # Symlink sources -if [ ! -d "run_web/${ECO2D_SERVER_URL}" ]; then - mkdir -p "run_web/${ECO2D_SERVER_URL/run_/build_}" - pushd run_web - ln -s "/workspaces/eco2d/code" "${ECO2D_SERVER_URL/run_web/}/code" - ln -s "/workspaces/eco2d/build_web/_deps" "${ECO2D_SERVER_URL/run_web/}build_web/_deps" +if [ ! -d "build_web/${ECO2D_SERVER_URL}" ]; then + mkdir -p "build_web/${ECO2D_SERVER_URL}" + pushd build_web + ln -s "/workspaces/eco2d/code" "${ECO2D_SERVER_URL/build_web/}/code" + ln -s "/workspaces/eco2d/build_web/_deps" "${ECO2D_SERVER_URL/build_web/}build_web/_deps" popd fi + +web/build.sh diff --git a/web/host.sh b/web/host.sh index 0400b26..05c0248 100755 --- a/web/host.sh +++ b/web/host.sh @@ -2,12 +2,8 @@ set -xe -if [ -d "run_web" ]; then - rm -rf run_web +if [ -d "build_web" ]; then + rm -rf build_web fi -mkdir run_web -cp build_web/eco2d.* run_web/ -cp build_web/index.html run_web/ - -python -m http.server --directory run_web --bind 127.0.0.1 +python -m http.server --directory build_web --bind 127.0.0.1