mirror of
https://github.com/Phantop/appdwarf.git
synced 2024-11-09 08:26:22 +00:00
36 lines
640 B
Bash
Executable file
36 lines
640 B
Bash
Executable file
#!/bin/sh
|
|
# shellcheck source=../appdwarf
|
|
SOURCE=1 . "$(which appdwarf)"
|
|
|
|
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
|
|
TYPE=$(echo "$TYPE" | tr "[:upper:]" "[:lower:]")
|
|
VER=$(curl $LINK/"$VER"/latest.version)
|
|
LINK="$LINK/$VER/dotnet-$TYPE-$VER-linux-x64.tar.gz"
|
|
ungz
|
|
|
|
apprun() {
|
|
export DOTNET_ROOT="$APPDIR"
|
|
case "$(basename "$ARGV0")" in
|
|
dotnetenv )
|
|
exec "$@" ;;
|
|
* )
|
|
exec "$APPDIR/$(basename "$ARGV0")" "$@" ;;
|
|
esac
|
|
}
|
|
|
|
appa
|
|
appmk
|