forked from jessfraz/dockerfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstart.sh
executable file
·31 lines (27 loc) · 837 Bytes
/
start.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
#!/bin/bash
set -e
ROOT=/usr/src/gitiles
PROPERTIES=
if [ "x$1" != "x" ]; then
PROPERTIES="--jvm_flag=-Dcom.google.gitiles.configPath=$1"
else
PROPERTIES="--jvm_flag=-Dcom.google.gitiles.configPath=/gitfiles.config"
cat > /gitfiles.config <<-EOF
[gitiles]
# Repositories placed here
basePath = /home/git
# Do not check they are exported
exportAll = true
# This URL will be displayed as clone URL. DO NOT FORGET TRAILING SLASH!
baseGitUrl = ${BASE_GIT_URL}:
# Title of site (doh)
siteTitle = Gitiles - ${SITE_TITLE}
# I dunno why, but it is have to be configured.
canonicalHostName = ${SITE_TITLE}
[google]
analyticsId = UA-${GA_ID}
EOF
fi
PROPERTIES="$PROPERTIES --jvm_flag=-Dcom.google.gitiles.sourcePath=$ROOT"
# shellcheck disable=SC2086
exec "${ROOT}/bin/java/com/google/gitiles/dev/dev" $PROPERTIES