summaryrefslogtreecommitdiff
path: root/baserock_opengrok/clone-and-index.sh
blob: 10a8faac457f2631efd6225ba262d19b476b097a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh


dir={{ OPENGROK_BASE }}/source
if [ ! -d $dir/.git ]; then
        git clone /opt/export-workdir/exported-definitions/ $dir
fi

git --git-dir="$dir/.git" --work-tree="$dir" pull
(cd $dir && git submodule init)
(cd $dir && git submodule sync)
(cd $dir && git submodule update)
git --git-dir="$dir/.git" --work-tree="$dir" clean -xdff

OPENGROK_INSTANCE_BASE={{ OPENGROK_BASE }} {{ OPENGROK_BASE }}/bin/OpenGrok index {{ OPENGROK_BASE }}/source/