Last active
March 3, 2020 00:45
-
-
Save helpermethod/7be2867bea73a11e642e3a4bcb73e273 to your computer and use it in GitHub Desktop.
.sdkrc support for sdkman
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
__sdk_local() { | |
[[ ! -f .sdkrc ]] || return | |
local line | |
while IFS= read -r line; do | |
local candidate=${line%=*} | |
local version=${line#*=} | |
[[ ! -d "$SDKMAN_CANDIDATES_DIR/$candidate/$version" ]] && sdk install "$candidate" "$version" | |
sdk use "$candidate" "$version" | |
done < .sdkrc | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment