Mercurial Hosting > junotu
changeset 22:a60e20304924
Added a packaging script
Generates a JAR and launch script for Linux.
author | Fox |
---|---|
date | Thu, 05 May 2022 00:45:16 +0200 |
parents | 0e480624a38a |
children | 222aafd9491b |
files | package.gui_sh |
diffstat | 1 files changed, 23 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/package.gui_sh Thu May 05 00:45:16 2022 +0200 @@ -0,0 +1,23 @@ +#!/bin/sh + +#export _JAVA_AWT_WM_NONREPARENTING=1 +export CLASSPATH=./src:./build:./lib/lucene-core-3.0.3.jar +#JAVA=/usr/lib/jvm/java-8-openjdk-amd64/bin/java + +if [ ! -d './build' ]; then + mkdir ./build +fi + +if [ ! -d './build/packed' ]; then + mkdir ./build/packed +fi + +javac -d ./build $(find ./src -name '*.java' | xargs) && cd build && jar cvf ./packed/JUnotu.jar $(find ./ -name *.class) +cd .. +cat > ./build/packed/run.sh <<EOF +#!/bin/sh +export CLASSPATH=./lucene-core-3.0.3.jar:./JUnotu.jar +java junotu.Main +EOF +chmod +x ./build/packed/run.sh +scp -r ./lib/* ./build/packed/