mirror of
https://github.com/Phantop/appdwarf.git
synced 2024-11-10 08:54:54 +00:00
18 lines
413 B
Bash
Executable file
18 lines
413 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/jre/hotspot/normal/eclipse
|
|
curl -L "$LINK" | tar xz -C$DIR
|
|
mv $DIR/jdk* $DIR/jre
|
|
|
|
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
|