mirror of
https://github.com/Phantop/appdwarf.git
synced 2024-11-10 00:46:30 +00:00
Phantop
3ebee5f254
Deprecates $APPDWARF_CMD for $ARGV0, as part of the standard Also finally removes the separate header, as it seems to not be needed anymore
19 lines
540 B
Bash
Executable file
19 lines
540 B
Bash
Executable file
#!/bin/sh
|
|
PATH=$(dirname "$(readlink -f "${0}")")/..:$PATH
|
|
DIR=/tmp/appdwarf/java
|
|
mkdir -p $DIR
|
|
VER=$1
|
|
shift
|
|
|
|
LINK=https://api.adoptium.net/v3/binary/latest/$VER/ga/linux/x64/jdk/hotspot/normal/eclipse
|
|
curl -L "$LINK" | tar xz -C$DIR
|
|
mv $DIR/jdk* $DIR/jdk
|
|
$DIR/jdk/bin/jlink --add-modules ALL-MODULE-PATH --output $DIR/jre --strip-debug --no-man-pages --no-header-files --compress=0
|
|
|
|
cp "$(dirname "$(readlink -f "${0}")")"/../AppRun $DIR/jre
|
|
sed -i 4s#/#/bin/# $DIR/jre/AppRun
|
|
|
|
appdwarf $DIR/jre "$@"
|
|
mv $DIR/jre.sh java"$VER"
|
|
rm -rf $DIR
|