drop run_web
parent
9563e0654f
commit
4da9db876a
14
web/bind.sh
14
web/bind.sh
|
@ -5,14 +5,16 @@
|
||||||
read -p "Enter URL: " URL
|
read -p "Enter URL: " URL
|
||||||
|
|
||||||
# Expose URL to environment
|
# Expose URL to environment
|
||||||
export ECO2D_SERVER_URL=${URL/https:\/\//}run_web
|
export ECO2D_SERVER_URL=${URL/https:\/\//}build_web
|
||||||
echo ${ECO2D_SERVER_URL}
|
echo ${ECO2D_SERVER_URL}
|
||||||
|
|
||||||
# Symlink sources
|
# Symlink sources
|
||||||
if [ ! -d "run_web/${ECO2D_SERVER_URL}" ]; then
|
if [ ! -d "build_web/${ECO2D_SERVER_URL}" ]; then
|
||||||
mkdir -p "run_web/${ECO2D_SERVER_URL/run_/build_}"
|
mkdir -p "build_web/${ECO2D_SERVER_URL}"
|
||||||
pushd run_web
|
pushd build_web
|
||||||
ln -s "/workspaces/eco2d/code" "${ECO2D_SERVER_URL/run_web/}/code"
|
ln -s "/workspaces/eco2d/code" "${ECO2D_SERVER_URL/build_web/}/code"
|
||||||
ln -s "/workspaces/eco2d/build_web/_deps" "${ECO2D_SERVER_URL/run_web/}build_web/_deps"
|
ln -s "/workspaces/eco2d/build_web/_deps" "${ECO2D_SERVER_URL/build_web/}build_web/_deps"
|
||||||
popd
|
popd
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
web/build.sh
|
||||||
|
|
10
web/host.sh
10
web/host.sh
|
@ -2,12 +2,8 @@
|
||||||
|
|
||||||
set -xe
|
set -xe
|
||||||
|
|
||||||
if [ -d "run_web" ]; then
|
if [ -d "build_web" ]; then
|
||||||
rm -rf run_web
|
rm -rf build_web
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir run_web
|
python -m http.server --directory build_web --bind 127.0.0.1
|
||||||
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
|
|
||||||
|
|
Loading…
Reference in New Issue