forked from ammar257ammar/virtuoso-httpd-docker
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathscript.sh
More file actions
executable file
·25 lines (21 loc) · 871 Bytes
/
script.sh
File metadata and controls
executable file
·25 lines (21 loc) · 871 Bytes
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
#!/bin/bash
if [[ -z "${SNORQL_ENDPOINT}" ]]; then
echo "SNORQL_ENDPOINT is not set"
else
sed -i -e 's#var _endpoint = '".*"';#var _endpoint = "'"${SNORQL_ENDPOINT}"'";#g' /usr/local/apache2/htdocs/assets/js/snorql.js
fi
if [[ -z "${SNORQL_EXAMPLES_REPO}" ]]; then
echo "SNORQL_EXAMPLES_REPO is not set"
else
sed -i -e 's#var _examples_repo = '".*"';#var _examples_repo = "'"${SNORQL_EXAMPLES_REPO}"'";#g' /usr/local/apache2/htdocs/assets/js/snorql.js
fi
if [[ -z "${DEFAULT_GRAPH}" ]]; then
echo "DEFAULT_GRAPH is not set"
else
sed -i -e 's#var _defaultGraph = '".*"';#var _defaultGraph = "'"${DEFAULT_GRAPH}"'";#g' /usr/local/apache2/htdocs/assets/js/snorql.js
fi
if [[ -z "${SNORQL_TITLE}" ]]; then
echo "SNORQL_TITLE is not set"
else
sed -i -e 's#<title>'".*"'</title>#<title>'"${SNORQL_TITLE}"'</title>#g' /usr/local/apache2/htdocs/index.html
fi