Having SDKMAN! installed (http://sdkman.io/), I can install packages from the command line using for example:
sdk install java 8u144-zulu
However, when I try to do the same thing from within a script "my-installer.sh", I get error message: "sdk: command not found".
my-installer.sh:
#!/bin/bash
sdk install java 8u144-zulu
What am I doing wrong?
you need to source in ~/.sdkman/bin/sdkman-init.sh, like in
'sdk' is a bash function declared in sdkman-init.sh, and your first line (#!...) starts a new(!) shell.
hope that helps! weHe