Last active
April 1, 2019 15:44
-
-
Save tianchaijz/19d54ffd84fac296eb4722a884d9b9c0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# https://github.com/oracle/opengrok/wiki/How-to-setup-OpenGrok | |
# https://github.com/OpenGrok/docker/blob/master/Dockerfile | |
VERSION="1.2.6" | |
LINK="https://github.com/oracle/opengrok/releases/download/${VERSION}/opengrok-${VERSION}.tar.gz" | |
TOMCAT_LINK="http://ftp.yz.yamagata-u.ac.jp/pub/network/apache/tomcat/tomcat-8/v8.5.39/bin/apache-tomcat-8.5.39.tar.gz" | |
OPENGROK=$PWD/opengrok | |
# sudo apt-get install -y curl python3 python3-pip openjdk-11-jdk exuberant-ctags git subversion mercurial unzip autotools-dev pkg-config | |
# XXX: proxy.sh | |
# test -f opengrok.tar.gz || curl -L $LINK -o opengrok.tar.gz | |
# test -f tomcat.tar.gz || curl -L $TOMCAT_LINK -o tomcat.tar.gz | |
# | |
# rm -rf opengrok tomcat | |
# mkdir -p tomcat | |
# mkdir -p opengrok | |
# tar xzvf tomcat.tar.gz --strip-components=1 -C tomcat | |
# tar xzvf opengrok.tar.gz --strip-components=1 -C opengrok | |
# | |
# git clone https://github.com/universal-ctags/ctags | |
# | |
# cd ctags && ./autogen.sh && ./configure --prefix=/opt/ctags && make && sudo make install | |
# | |
# mkdir -p repo/src | |
# mkdir -p repo/data | |
# | |
# rm -rf $PWD/tomcat/webapps/* | |
sudo python3 -m pip install $OPENGROK/tools/opengrok-tools.tar.gz | |
opengrok-deploy \ | |
$OPENGROK/lib/source.war $PWD/tomcat/webapps/ROOT.war \ | |
-c $PWD/configuration.xml | |
opengrok-indexer \ | |
-a $OPENGROK/lib/opengrok.jar -- \ | |
-c /opt/ctags/bin/ctags \ | |
-s $PWD/repo/src -d $PWD/repo/data -H -P -S -G \ | |
-W $PWD/configuration.xml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment