diff options
author | JP Ungaretti <git@jungaretti.com> | 2023-03-01 05:34:31 +0300 |
---|---|---|
committer | JP Ungaretti <git@jungaretti.com> | 2023-03-01 05:34:31 +0300 |
commit | 6b84b694ada71cdc5bd02ec874816ec4b3e9d2c2 (patch) | |
tree | e8f58523d65210bde0a5dfd89046eec015f9a7a4 | |
parent | 11d0be5f671652edce7446a6ddf40f9faca0d1e1 (diff) |
Install additional versions
-rw-r--r-- | src/dotnet/install.sh | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/dotnet/install.sh b/src/dotnet/install.sh index 8243bbe..3e9093d 100644 --- a/src/dotnet/install.sh +++ b/src/dotnet/install.sh @@ -79,7 +79,18 @@ chmod +x "$DOTNET_INSTALL_SCRIPT" # Install primary version install_version "$DOTNET_VERSION" -# TODO: Install additional versions +# Install additional versions +if [ -n "$DOTNET_ADDITIONAL_VERSIONS" ]; then + OLD_IFS=$IFS + IFS="," + read -a additional_versions <<< "$DOTNET_ADDITIONAL_VERSIONS" + for version in "${additional_versions[@]}"; do + # Trim whitespace from version + version="$(echo -e "$version" | tr -d '[:space:]')" + install_version "$version" + done + IFS=$OLD_IFS +fi rm "$DOTNET_INSTALL_SCRIPT" |