eco2d/host_web.sh

18 lines
443 B
Bash
Raw Normal View History

2022-09-11 23:28:41 +00:00
#!/bin/bash
# Run as "source web_host.sh" to set up environment variables
# Prompt for URL
read -p "Enter URL: " URL
# Expose URL to environment
export ECO2D_SERVER_URL=${URL/https:\/\//}build_web
echo ${ECO2D_SERVER_URL}
# Symlink sources
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"
popd
fi