mirror of
https://github.com/Phantop/appdwarf.git
synced 2024-11-10 08:54:54 +00:00
16 lines
376 B
Bash
Executable file
16 lines
376 B
Bash
Executable file
#!/bin/sh
|
|
PATH=$(dirname "$(readlink -f "${0}")")/..:$PATH
|
|
DIR=/tmp/appdwarf/java
|
|
mkdir $DIR
|
|
LINK=https://api.adoptium.net/v3/binary/latest/$1/ga/linux/x64/jre/hotspot/normal/eclipse
|
|
curl -L "$LINK" | tar xz -C$DIR
|
|
|
|
mv $DIR/jdk*/* $DIR
|
|
cp "$(dirname "$(readlink -f "${0}")")"/../AppRun $DIR
|
|
sed -i 4s#/#/bin/# $DIR/AppRun
|
|
|
|
shift
|
|
appdwarf $DIR "$@"
|
|
mv $DIR.sh java
|
|
rm -rf $DIR
|