-
Notifications
You must be signed in to change notification settings - Fork 58
Expand file tree
/
Copy pathcustomize.sh
More file actions
41 lines (34 loc) · 1.04 KB
/
customize.sh
File metadata and controls
41 lines (34 loc) · 1.04 KB
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
#!/bin/bash
#
# Little helper script deploys runtime
# injected configuration overrides like
# css theming, logo graphics, and translation text
#
# cd to root of data-portal/ repo
cd "$(dirname $(dirname "${BASH_SOURCE}"))"
set -v
APP="${APP:-dev}"
if [ -f custom/favicon/$APP-favicon.ico ]; then
cp custom/favicon/$APP-favicon.ico src/img/favicon.ico
fi
if [ -f custom/logo/$APP-logo.png ]; then
cp custom/logo/$APP-logo.png src/img/logo.png
fi
if [ -f custom/createdby/$APP.png ]; then
cp custom/createdby/$APP.png src/img/createdby.png
fi
if [ -f custom/privacy_policy.md ]; then
echo 'got privacy policy'
cp custom/privacy_policy.md src/privacy_policy.md
fi
if [ -f custom/css/$APP.css ]; then
cp custom/css/$APP.css src/css/themeoverrides.css
mkdir -p public/src/css/
cp custom/css/$APP.css public/src/css/themeoverrides.css
else
rm -rf public/src
echo "/* generated file - see customize.sh */" > src/css/themeoverrides.css
fi
if [ -d custom/sponsors/$APP-sponsors ]; then
cp -r custom/sponsors/$APP-sponsors src/img/sponsors
fi