diff options
author | JP Ungaretti <git@jungaretti.com> | 2023-03-03 03:37:53 +0300 |
---|---|---|
committer | JP Ungaretti <git@jungaretti.com> | 2023-03-03 03:37:53 +0300 |
commit | 2b64508a1ab9f454741b24d504228db8cc0374f1 (patch) | |
tree | 9a6fff68c7e85dd5a8b9661c19b0d3214709742f /src/dotnet/install.sh | |
parent | b00c0796028f82a4db0b43988cf57e33c5a95691 (diff) |
Add route for LTS option
Diffstat (limited to 'src/dotnet/install.sh')
-rw-r--r-- | src/dotnet/install.sh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/dotnet/install.sh b/src/dotnet/install.sh index a302947..e21d3f9 100644 --- a/src/dotnet/install.sh +++ b/src/dotnet/install.sh @@ -36,7 +36,7 @@ check_packages() { # The version must be 'latest', use the form 'X', or use the form 'X.Y.Z' install_version() { local version="$1" - local channel="LTS" + local channel="STS" local runtime_arg="" echo "Installing version '$version'..." @@ -47,6 +47,12 @@ install_version() { version="latest" fi + # If version is 'lts', then update the channel + if [ "$version" = "lts" ]; then + channel="LTS" + version="latest" + fi + # Make sure the version is formatted correctly (form 'X' is handled before this) if ! [[ "$version" = "latest" || "$version" =~ ^[0-9]+.[0-9]+.[0-9]+$ ]]; then echo "Invalid version '$version': version must be 'latest' or use the form 'X.Y.Z'" |