drop run_web
parent
9563e0654f
commit
4da9db876a
14
web/bind.sh
14
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
|
||||
|
|
10
web/host.sh
10
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
|
||||
|
|
Loading…
Reference in New Issue