2022-12-08 20:25:43 -08:00
|
|
|
#!/usr/bin/env bash
|
2023-04-11 20:26:25 -07:00
|
|
|
# @file SDKMAN Install
|
|
|
|
# @brief Ensures SDKMAN is installed.
|
|
|
|
# @description
|
|
|
|
# This script ensures SDKMAN (a Java version manager) is installed using the method recommended on [their
|
|
|
|
# website](https://sdkman.io/).
|
2022-12-08 20:25:43 -08:00
|
|
|
|
2022-12-25 00:30:40 -08:00
|
|
|
{{ includeTemplate "universal/profile" }}
|
|
|
|
{{ includeTemplate "universal/logg" }}
|
2022-12-08 20:25:43 -08:00
|
|
|
|
|
|
|
### Ensure SDKMan is installed (https://sdkman.io/)
|
|
|
|
if [ ! -d "$SDKMAN_DIR" ]; then
|
2023-02-01 18:18:06 -08:00
|
|
|
logg info 'Installing SDKMan via `curl -s "https://get.sdkman.io?rcupdate=false`'
|
2022-12-08 20:25:43 -08:00
|
|
|
logg info "Install directory: $SDKMAN_DIR"
|
2023-02-01 18:18:06 -08:00
|
|
|
curl -s "https://get.sdkman.io?rcupdate=false" | bash
|
2022-12-08 20:25:43 -08:00
|
|
|
else
|
|
|
|
logg info 'SDKMan appears to already be installed.'
|
|
|
|
fi
|