Update .gitignore and run.sh to streamline source file management and compilation process

This commit is contained in:
Dominik Krenn 2025-09-15 15:34:40 +02:00
parent 6d2b939bc6
commit 6b774aec63
2 changed files with 8 additions and 2 deletions

1
.gitignore vendored
View File

@ -3,3 +3,4 @@ instance/
*.class
*.db
.vscode/
sources.txt

9
run.sh
View File

@ -8,16 +8,21 @@ if ! command -v java >/dev/null 2>&1; then
exit 1
fi
# build list of source files
find src -name "*.java" > sources.txt
echo "Main.java" >> sources.txt
if ! javac -d build -cp "./extern/sqlite-jdbc-3.50.3.0.jar" @sources.txt Main.java; then
# compile with all extern jars
if ! javac -d build -cp "extern/*" @sources.txt Main.java; then
echo "Error: javac failed to compile sources."
exit 1
fi
rm sources.txt
# create instance dir if not exists
if [ ! -d "instance" ]; then
mkdir instance
fi
java -cp "build:./extern/sqlite-jdbc-3.50.3.0.jar" Main
# run with all extern jars
java -cp "build:extern/*" Main