Skip to content

Commit

Permalink
apps: dotnet, java: easily pick type/ver; add pinta
Browse files Browse the repository at this point in the history
  • Loading branch information
Phantop committed Jun 6, 2024
1 parent 3947511 commit 33df429
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 4 deletions.
21 changes: 18 additions & 3 deletions apps/mkdotnet
Original file line number Diff line number Diff line change
@@ -1,9 +1,24 @@
#!/bin/sh
. "$(dirname "$0")"/appmk
part0
LINK=https://dotnetcli.azureedge.net/dotnet/Sdk
VER=$(curl $LINK/STS/latest.version)
LINK="$LINK/$VER/dotnet-sdk-$VER-linux-x64.tar.gz"

TYPE=Runtime
VER=LTS
while [ $# -gt 0 ]; do
case "$1" in
STS | sts )
VER=STS ;;
SDK | Sdk | sdk )
TYPE=Sdk ;;
esac
shift
done


LINK=https://dotnetcli.azureedge.net/dotnet/$TYPE
VER=$(curl $LINK/"$VER"/latest.version)
TYPE=$(echo "$TYPE" | tr "[:upper:]" "[:lower:]")
LINK="$LINK/$VER/dotnet-$TYPE-$VER-linux-x64.tar.gz"
ungz
ln -s dotnet "$DIR"/AppRun
part9
15 changes: 14 additions & 1 deletion apps/mkjava
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
#!/bin/sh
. "$(dirname "$0")"/appmk
part0
LINK=https://api.adoptium.net/v3/binary/latest/$1/ga/linux/x64/jdk/hotspot/normal/eclipse

TYPE=jre
VER=21
while [ $# -gt 0 ]; do
case "$1" in
jdk | JDK )
TYPE=JDK ;;
* )
VER=$1 ;;
esac
shift
done

LINK=https://api.adoptium.net/v3/binary/latest/$VER/ga/linux/x64/"$TYPE"/hotspot/normal/eclipse
shift
ungz
mv "$DIR"/jdk*/* "$DIR"
Expand Down
11 changes: 11 additions & 0 deletions apps/mkpinta
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh
. "$(dirname "$0")"/appmk
part0
API=/repos/PintaProject/Pinta/actions/artifacts
QUERY='.artifacts[] | select(.name == "Pinta-linux-dotnet-8.0.x.zip") | .archive_download_url'
LINK=$(gh api $API -q "$QUERY" | head -n1)
gh api "$LINK" | bsdtar xf - -C"$DIR"
bsdtar xf "$DIR"/*.zip -C"$DIR"
rm "$DIR"/*.zip
appa
part9

0 comments on commit 33df429

Please sign in to comment.