install.fairie/home/.chezmoiscripts/universal/run_onchange_after_18-install-sdkman.sh.tmpl
Brian Zalewski 69620eba19 Update 3 files
- /home/.chezmoiscripts/universal/run_onchange_after_18-install-sdkman.sh.tmpl
- /home/.chezmoidata.yaml
- /software.yml
2023-04-23 03:36:24 +00:00

20 lines
716 B
Bash

#!/usr/bin/env bash
# @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/).
{{ includeTemplate "universal/profile" }}
{{ includeTemplate "universal/logg" }}
### Ensure SDKMan is installed (https://sdkman.io/)
if [ ! -d "$SDKMAN_DIR" ]; then
logg info 'Installing SDKMan via `curl -s "https://get.sdkman.io?rcupdate=false`'
logg info "Install directory: $SDKMAN_DIR"
curl -s "https://get.sdkman.io?rcupdate=false" | bash
logg info 'Running `sdk install java`'
sdk install java
else
logg info 'SDKMan appears to already be installed.'
fi