I recently knew about sdkman in gitpod.io and I wanna install different java versions using this manager. But I have a very old version of sdkman. That's I need to update it, then install java. But I don't wanna type this commands in my every repository in gitpod. That's why I have written an shell script prerequisites.sh
and I will use this file in every repository. The script is:-
sdk update
sdk install java 17-open
there are lots of command under this, but they're not necessary in this question.
But then I knew that after updating sdkman, I need to restart terminal. I found that exec bash
restarts terminal. But when I add exec bash
in my shell script, it doesn't execute the commands below the exec bash
command. Can someone suggest me, how to do this?
sdk update
exec bash #recently added, but doesn't execute the commands after it :(
sdk install java 17-open