2017-05-31 05:12:55 +02:00
|
|
|
#!/bin/bash
|
2016-04-06 12:32:01 +02:00
|
|
|
set -e
|
|
|
|
|
2017-02-12 19:25:18 +01:00
|
|
|
ROOT=/usr/src/gitiles
|
2016-04-06 12:32:01 +02:00
|
|
|
PROPERTIES=
|
|
|
|
|
|
|
|
if [ "x$1" != "x" ]; then
|
2017-02-12 20:02:27 +01:00
|
|
|
PROPERTIES="--jvm_flag=-Dcom.google.gitiles.configPath=$1"
|
2016-04-06 19:21:51 +02:00
|
|
|
else
|
2017-02-12 20:02:27 +01:00
|
|
|
PROPERTIES="--jvm_flag=-Dcom.google.gitiles.configPath=/gitfiles.config"
|
2016-04-06 19:21:51 +02:00
|
|
|
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!
|
2016-10-02 06:43:54 +02:00
|
|
|
baseGitUrl = ${BASE_GIT_URL}:
|
2016-04-06 19:21:51 +02:00
|
|
|
# Title of site (doh)
|
2016-10-02 06:43:54 +02:00
|
|
|
siteTitle = Gitiles - ${SITE_TITLE}
|
2016-04-06 19:21:51 +02:00
|
|
|
# I dunno why, but it is have to be configured.
|
2016-10-02 06:43:54 +02:00
|
|
|
canonicalHostName = ${SITE_TITLE}
|
|
|
|
[google]
|
|
|
|
analyticsId = UA-${GA_ID}
|
2016-04-06 19:21:51 +02:00
|
|
|
EOF
|
2016-04-06 12:32:01 +02:00
|
|
|
fi
|
2016-04-06 19:21:51 +02:00
|
|
|
|
2017-02-12 20:02:27 +01:00
|
|
|
PROPERTIES="$PROPERTIES --jvm_flag=-Dcom.google.gitiles.sourcePath=$ROOT"
|
2016-04-06 12:32:01 +02:00
|
|
|
|
2018-09-25 01:37:37 +02:00
|
|
|
# shellcheck disable=SC2086
|
2019-09-17 03:18:07 +02:00
|
|
|
exec "${ROOT}/bin/java/com/google/gitiles/dev/dev" $PROPERTIES
|