mirror of
https://github.com/Cametendo/Cards-Gate.git
synced 2026-03-18 09:00:19 +01:00
Add build.sh install.sh run.sh
This commit is contained in:
13
scripts/build.sh
Executable file
13
scripts/build.sh
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
VERSION="2.13.1"
|
||||
|
||||
echo "start building..."
|
||||
|
||||
set -e
|
||||
|
||||
mkdir -p out
|
||||
|
||||
javac -cp "lib/gson-${VERSION}.jar" -d out $(find Cards-Gate/src -name "*.java")
|
||||
|
||||
echo "build finished"
|
||||
22
scripts/install.sh
Executable file
22
scripts/install.sh
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
VERSION="2.13.1"
|
||||
URL="https://search.maven.org/remotecontent?filepath=com/google/code/gson/gson/2.13.1/gson-2.13.1.jar"
|
||||
|
||||
LIB_DIR="./lib"
|
||||
JAR_PATH="${LIB_DIR}/gson-${VERSIO}N.jar"
|
||||
|
||||
|
||||
mkdir -p "$LIB_DIR"
|
||||
|
||||
|
||||
if [ -f "$JAR_PATH" ]; then
|
||||
echo "gson-${VERSION}.jar already exists"
|
||||
else
|
||||
echo "gson-${VERSION}.jar herunter"
|
||||
curl -L "$URL" -o "$JAR_PATH"
|
||||
echo "Download succesfull"
|
||||
fi
|
||||
|
||||
echo "Installation done. You can now run build.sh"
|
||||
10
scripts/run.sh
Executable file
10
scripts/run.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
MAIN_CLASS="Main"
|
||||
VERSION="2.13.1"
|
||||
|
||||
echo "Running $MAIN_CLASS..."
|
||||
|
||||
java -cp "out:lib/gson-${VERSION}.jar" $MAIN_CLASS
|
||||
|
||||
echo "Finished running $MAIN_CLASS"
|
||||
Reference in New Issue
Block a user