mirror of
https://github.com/jessfraz/dockerfiles.git
synced 2024-11-23 19:32:30 +01:00
b7c09d20ab
Signed-off-by: Jess Frazelle <acidburn@google.com>
31 lines
797 B
Bash
Executable File
31 lines
797 B
Bash
Executable File
#!/bin/sh
|
|
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"
|
|
|
|
exec "${ROOT}/bazel-bin/gitiles-dev/dev" $PROPERTIES
|