overleaf/services/git-bridge/install.sh

13 lines
433 B
Bash
Raw Normal View History

2014-12-05 15:38:12 -05:00
if [ "$(id -u)" != "0" ]; then
echo "You must be root to install" 1>&2
exit 1
fi
2014-12-05 16:00:20 -05:00
command -v ant >/dev/null 2>&1 && command -v /usr/lib/jvm/java-7-openjdk-amd64/bin/javac >/dev/null 2>&1 || ./install-deps.sh
2014-12-05 15:38:12 -05:00
ant all &&\
2014-12-05 16:15:37 -05:00
mv ./bin/writelatex-git-bridge.jar /usr/local/sbin/ &&\
2014-12-05 15:38:12 -05:00
cp ./bin/wlgb /etc/init.d/ &&\
mkdir -p /var/log/wlgb &&\
mkdir -p /etc/wlgb &&\
2014-12-05 17:41:31 -05:00
cp ./bin/config.json /etc/wlgb/ &&\
2014-12-05 15:38:12 -05:00
/usr/sbin/update-rc.d -f wlgb defaults