diff options
Diffstat (limited to 'scripts/link_debian.sh')
-rwxr-xr-x | scripts/link_debian.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/scripts/link_debian.sh b/scripts/link_debian.sh new file mode 100755 index 0000000..183cb99 --- /dev/null +++ b/scripts/link_debian.sh @@ -0,0 +1,24 @@ +#!/bin/bash +# Links everything into a self-contained executable using jlink. + +set -e + +# Needed if you have a java version other than 11 as default +JAVA_HOME='/usr/lib/jvm/java-11-openjdk-amd64' + +# Compile sources +mvn compile + +# Patch gson +if [ ! -e modules/gson.jar ]; then + ./scripts/patch_gson.sh +fi + +# Build using jlink +rm -rf dist/debian +$JAVA_HOME/bin/jlink \ + --module-path modules/gson.jar:target/classes \ + --add-modules gson,javacs \ + --launcher launcher=javacs/org.javacs.Main \ + --output dist/debian \ + --compress 2 |