mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-26 20:44:09 +00:00
19 lines
778 B
Text
Executable file
19 lines
778 B
Text
Executable file
installDeps() {
|
|
sudo apt-get update
|
|
sudo apt-get install -y maven
|
|
sudo apt-get install -y openjdk-7-jdk
|
|
sudo update-alternatives --set java /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java
|
|
sudo update-alternatives --set javac /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/javac
|
|
return 1
|
|
}
|
|
|
|
command -v mvn >/dev/null 2>&1 && command -v /usr/lib/jvm/java-7-openjdk-amd64/bin/javac >/dev/null 2>&1 || installDeps
|
|
mvn package &&\
|
|
sudo cp ./target/writelatex-git-bridge-1.0-SNAPSHOT-jar-with-dependencies.jar /usr/local/sbin/writelatex-git-bridge.jar &&\
|
|
sudo cp ./bin/wlgb /etc/init.d/ &&\
|
|
sudo mkdir -p /var/log/wlgb &&\
|
|
sudo mkdir -p /etc/wlgb &&\
|
|
if [ ! -f /etc/wlgb/config.json ]; then
|
|
sudo cp ./bin/config.json /etc/wlgb/
|
|
fi &&\
|
|
sudo /usr/sbin/update-rc.d -f wlgb defaults
|