Update .gitignore and run.sh to streamline source file management and compilation process
This commit is contained in:
parent
6d2b939bc6
commit
6b774aec63
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,3 +3,4 @@ instance/
|
|||||||
*.class
|
*.class
|
||||||
*.db
|
*.db
|
||||||
.vscode/
|
.vscode/
|
||||||
|
sources.txt
|
||||||
|
|||||||
9
run.sh
9
run.sh
@ -8,16 +8,21 @@ if ! command -v java >/dev/null 2>&1; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# build list of source files
|
||||||
find src -name "*.java" > sources.txt
|
find src -name "*.java" > sources.txt
|
||||||
echo "Main.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."
|
echo "Error: javac failed to compile sources."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
rm sources.txt
|
rm sources.txt
|
||||||
|
|
||||||
|
# create instance dir if not exists
|
||||||
if [ ! -d "instance" ]; then
|
if [ ! -d "instance" ]; then
|
||||||
mkdir instance
|
mkdir instance
|
||||||
fi
|
fi
|
||||||
|
|
||||||
java -cp "build:./extern/sqlite-jdbc-3.50.3.0.jar" Main
|
# run with all extern jars
|
||||||
|
java -cp "build:extern/*" Main
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user