forked from UweGerdes/frontend-development
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathentrypoint.sh
executable file
·48 lines (40 loc) · 1.26 KB
/
entrypoint.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/bash
# fix for installation failures on nodejs 8.11.1
export PATH=$PATH:/home/node/bin
if ! [ -x "$(command -v phantomjs)" ]; then
echo "initial install phantomjs"
cd "${NODE_HOME}"
export NODE_TLS_REJECT_UNAUTHORIZED=0
npm install phantomjs-prebuilt
mkdir -p /home/node/bin/
cp /home/node/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs /home/node/bin/
cd "${APP_HOME}"
fi
if [ ! -w "${APP_HOME}/" ]; then
echo "ERROR: ${APP_HOME}/ cannot write"
exit 1
fi
if [ ! -d "${APP_HOME}/bower_components" ]; then
echo "initial loading frontend dependencies"
bower install
fi
if [ ! -f "${APP_HOME}/htdocs/css/fonts/iconfont.ttf" ]; then
echo "initial building iconfont"
gulp iconfont
fi
if [ ! -f "${APP_HOME}/htdocs/css/bootstrap.css" ]; then
echo "initial building frontend-development"
gulp build
fi
if [ -d "${APP_HOME}/tests/compare-layouts" -a ! -f "${APP_HOME}/tests/compare-layouts/css/app.css" ]; then
echo "initial building tests/compare-layouts"
cd "${APP_HOME}/tests/compare-layouts/"
gulp build
fi
if [ -d "${APP_HOME}/tests/responsive-check" -a ! -f "${APP_HOME}/tests/responsive-check/css/app.css" ]; then
echo "initial building tests/responsive-check"
cd "${APP_HOME}/tests/responsive-check/"
gulp build
fi
cd "${APP_HOME}"
exec "$@"