diff options
| author | Leon Overweel <l.overweel@gmail.com> | 2017-04-05 15:25:24 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-04-05 15:25:24 +0200 |
| commit | 1b04a13129ad7b26218d5b13d77056bda1db9878 (patch) | |
| tree | 884e9d55b6b919f1f41ce6166f6976b64a622067 /build/configure.sh | |
| parent | fdb5cd61e4114ab677e7dd611a2f5d636f11e71e (diff) | |
| parent | 044874053e06e9abf255bb4d0c547cfe31fcc21a (diff) | |
Merge pull request #10 from atlarge-research/simplify-frontend-build
Simplify frontend build
Diffstat (limited to 'build/configure.sh')
| -rwxr-xr-x | build/configure.sh | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/build/configure.sh b/build/configure.sh index 75a61e7d..56f7f028 100755 --- a/build/configure.sh +++ b/build/configure.sh @@ -3,32 +3,6 @@ if [ ! -f "$1/opendc.db" ]; then sqlite3 "$1/opendc.db" < ./database/test.sql fi -if [ -z "$OAUTH_CLIENT_ID" ] -then - echo "OAuth client id not found. Define environment variable OAUTH_CLIENT_ID" - exit 1 -fi - -if [ -z "$OAUTH_CLIENT_SECRET" ] -then - echo "OAuth client secret not found. Define environment variable OAUTH_CLIENT_SECRET" - exit 2 -fi - -if [ -z "$SERVER_URL" ] -then - echo "URL of server not found. Define environment variable SERVER_URL" - exit 2 -fi - -sed -i "s/client-id/$OAUTH_CLIENT_ID/g" ./build/keys.json -sed -i "s/client-secret/$OAUTH_CLIENT_SECRET/g" ./build/keys.json - # ignore non ASCII characters LC_CTYPE=C LANG=C - -find ./opendc-frontend/build -type f -exec sed -i "s/the-google-oauth-client-id/$OAUTH_CLIENT_ID/g" {} \; -find ./opendc-frontend/build -type f -exec sed -i "s,https://opendc.ewi.tudelft.nl:443,$SERVER_URL,g" {} \; -find ./opendc-frontend/build -type f -exec sed -i "s,https://opendc.ewi.tudelft.nl,$SERVER_URL,g" {} \; -find ./opendc-frontend/build -type f -exec sed -i 's,LOCAL_MODE = (document.location.hostname === "localhost"),LOCAL_MODE = false,g' {} \;
\ No newline at end of file |
