2016-04-06 12:32:01 +02:00
|
|
|
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
|
2016-04-06 19:21:51 +02:00
|
|
|
ROOT=/gitiles
|
2016-04-06 12:32:01 +02:00
|
|
|
PROPERTIES=
|
|
|
|
|
|
|
|
if [ "x$1" != "x" ]; then
|
2016-04-06 19:21:51 +02:00
|
|
|
PROPERTIES="-Dcom.google.gitiles.configPath=$1"
|
|
|
|
else
|
|
|
|
PROPERTIES="-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!
|
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
|
|
|
|
2016-04-06 12:32:01 +02:00
|
|
|
PROPERTIES="$PROPERTIES -Dcom.google.gitiles.sourcePath=$ROOT"
|
|
|
|
|
2016-04-06 19:21:51 +02:00
|
|
|
exec java $PROPERTIES -jar "$ROOT/buck-out/gen/gitiles-dev/dev.jar"
|