From 6b774aec63412c098fdd1d44fe8049242a2d6820 Mon Sep 17 00:00:00 2001 From: Dominik Krenn Date: Mon, 15 Sep 2025 15:34:40 +0200 Subject: [PATCH] Update .gitignore and run.sh to streamline source file management and compilation process --- .gitignore | 1 + run.sh | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index d7fb33a..8cd7648 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ instance/ *.class *.db .vscode/ +sources.txt diff --git a/run.sh b/run.sh index 45192ec..fa23a1f 100755 --- a/run.sh +++ b/run.sh @@ -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