appdwarf/apps/mkjava

16 lines
376 B
Plaintext
Raw Normal View History

#!/bin/sh
2022-01-14 18:41:46 +00:00
PATH=$(dirname "$(readlink -f "${0}")")/..:$PATH
DIR=/tmp/appdwarf/java
2022-06-27 00:53:01 +00:00
mkdir $DIR
LINK=https://api.adoptium.net/v3/binary/latest/$1/ga/linux/x64/jre/hotspot/normal/eclipse
2022-01-14 18:41:46 +00:00
curl -L "$LINK" | tar xz -C$DIR
2021-12-14 06:45:43 +00:00
2022-06-27 00:53:01 +00:00
mv $DIR/jdk*/* $DIR
cp "$(dirname "$(readlink -f "${0}")")"/../AppRun $DIR
sed -i 4s#/#/bin/# $DIR/AppRun
2021-05-15 19:34:16 +00:00
2022-06-27 00:53:01 +00:00
shift
appdwarf $DIR "$@"
mv $DIR.sh java
2021-05-15 19:34:16 +00:00
rm -rf $DIR