Modifications to install script and deleted betamax jars.

This commit is contained in:
Winston Li 2015-01-09 07:43:12 +00:00
parent 00c0274108
commit 5633526845
7 changed files with 20 additions and 51 deletions

View file

@ -1,3 +1,2 @@
target/
*.jar
.idea/workspace.xml

View file

@ -1,13 +0,0 @@
<component name="libraryTable">
<library name="betamax-core">
<CLASSES>
<root url="jar://$PROJECT_DIR$/bin/betamax-core.jar!/" />
<root url="jar://$PROJECT_DIR$/bin/betamax-httpclient.jar!/" />
<root url="jar://$PROJECT_DIR$/bin/betamax-proxy.jar!/" />
<root url="jar://$PROJECT_DIR$/bin/betamax-tck.jar!/" />
<root url="jar://$PROJECT_DIR$/bin/betamax-test-support.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>

View file

@ -1,9 +0,0 @@
<component name="libraryTable">
<library name="betamax-junit">
<CLASSES>
<root url="jar://$PROJECT_DIR$/bin/betamax-junit.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>

View file

@ -9,13 +9,13 @@ Required
Installation
------------
### Ubuntu ###
Run `sudo install.sh` to get dependencies, build, test, package, and make it a service.
Run `sudo ./install.sh` to get dependencies, build, test, package, and make it a service.
Use `sudo service wlgb start` and `sudo service wlgb stop` to start and stop the server.
The configuration file will be at `/etc/wlgb/config.json`.
Run `sudo uninstall.sh` to undo what `sudo install.sh` did.
Run `sudo ./uninstall.sh` to undo what `sudo ./install.sh` did.
### Manually ###
Run `mvn package` to build, test, and package it into a jar at `target/writelatex-git-bridge-1.0-SNAPSHOT-jar-with-dependencies.jar`.

View file

@ -1,21 +1,19 @@
if [ "$(id -u)" != "0" ]; then
echo "You must be root to install" 1>&2
exit 1
fi
command -v ant >/dev/null 2>&1 && command -v /usr/lib/jvm/java-7-openjdk-amd64/bin/javac >/dev/null 2>&1 || installDeps()
command -v ant >/dev/null 2>&1 && command -v /usr/lib/jvm/java-7-openjdk-amd64/bin/javac >/dev/null 2>&1 || installDeps
mvn package &&\
mv ./target/writelatex-git-bridge-1.0-SNAPSHOT-jar-with-dependencies.jar /usr/local/sbin/ &&\
cp ./bin/wlgb /etc/init.d/ &&\
mkdir -p /var/log/wlgb &&\
mkdir -p /etc/wlgb &&\
cp ./bin/config.json /etc/wlgb/ &&\
/usr/sbin/update-rc.d -f wlgb defaults
sudo mv ./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
installDeps() {
apt-get update
apt-get install -y maven2
apt-get install -y openjdk-7-jdk
update-alternatives --set java /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java
update-alternatives --set javac /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/javac
sudo apt-get update
sudo apt-get install -y maven2
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
}

View file

@ -1,8 +1,4 @@
if [ "$(id -u)" != "0" ]; then
echo "You must be root to uninstall" 1>&2
exit 1
fi
rm -f /usr/local/sbin/writelatex-git-bridge.jar &&\
rm -f /etc/init.d/wlgb &&\
rm -rf /etc/wlgb
/usr/sbin/update-rc.d -f wlgb remove
sudo rm -f /usr/local/sbin/writelatex-git-bridge.jar &&\
sudo rm -f /etc/init.d/wlgb &&\
sudo rm -rf /etc/wlgb
sudo /usr/sbin/update-rc.d -f wlgb remove

View file

@ -15,8 +15,6 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="betamax-junit" level="project" />
<orderEntry type="library" name="betamax-core" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.10" level="project" />
<orderEntry type="library" name="Maven: org.hamcrest:hamcrest-core:1.1" level="project" />
<orderEntry type="library" name="Maven: org.jmock:jmock-junit4:2.6.0" level="project" />