From 54392a1073a2d119264c3218ec1e3200fe66db57 Mon Sep 17 00:00:00 2001 From: Trevor Merritt Date: Tue, 16 Nov 2021 08:18:42 -0500 Subject: [PATCH] Adds SDKMan so we can install Kotlin removes JAVA_HOME as its now managed by SDKMAN --- configs/zsh/zshrc | 6 ++++-- install.conf.yaml | 1 + scripts/install_fonts.sh | 4 ---- scripts/setupKotlin.sh | 12 ++++++++++++ scripts/updateGit.kts | 0 scripts/update_git.sh | 13 +++---------- 6 files changed, 20 insertions(+), 16 deletions(-) delete mode 100755 scripts/install_fonts.sh create mode 100755 scripts/setupKotlin.sh create mode 100644 scripts/updateGit.kts diff --git a/configs/zsh/zshrc b/configs/zsh/zshrc index 8c962ab..09a6873 100644 --- a/configs/zsh/zshrc +++ b/configs/zsh/zshrc @@ -146,5 +146,7 @@ _load_settings "$HOME/.zsh/configs" # aliases [[ -f ~/.aliases ]] && source ~/.aliases -export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64 -#export JAVA_HOME=/usr/lib/jvm/java-16-oracle + +#THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!! +export SDKMAN_DIR="$HOME/.sdkman" +[[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh" diff --git a/install.conf.yaml b/install.conf.yaml index 6c3cf65..c4ac5d9 100644 --- a/install.conf.yaml +++ b/install.conf.yaml @@ -40,3 +40,4 @@ ] - [git submodule update --init --recursive, Installing submodules] - [fc-cache -fv, Updating Font Cache] + - [~/.dotfiles/scripts/setupKotlin.sh, Setting up Kotlin] diff --git a/scripts/install_fonts.sh b/scripts/install_fonts.sh deleted file mode 100755 index 1740359..0000000 --- a/scripts/install_fonts.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -sudo mkdir -p /usr/share/fonts/truetype/MesloLGS -sudo cp fonts/* /usr/share/fonts/truetype/MesloLGS -sudo fc-cache -fv diff --git a/scripts/setupKotlin.sh b/scripts/setupKotlin.sh new file mode 100755 index 0000000..fd04341 --- /dev/null +++ b/scripts/setupKotlin.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +curl -s "https://get.sdkman.io?rcupdate=false" | bash +source "$HOME/.sdkman/bin/sdkman-init.sh" || sdk version || echo "Try running \"source \ +\"$HOME/.sdkman/bin/sdkman-init.sh\"\"" + + yes | sdk install kotlin || true + yes | sdk install kscript || true + yes | sdk install java 11.0.13-tem || true +sdk default java 11.0.13-tem || true +yes | sdk install gradle || true +sdk default gradle || true diff --git a/scripts/updateGit.kts b/scripts/updateGit.kts new file mode 100644 index 0000000..e69de29 diff --git a/scripts/update_git.sh b/scripts/update_git.sh index a33bd50..fc94370 100755 --- a/scripts/update_git.sh +++ b/scripts/update_git.sh @@ -1,12 +1,5 @@ #!/bin/bash -echo "This is where we update Git!" - -cd ~/Projects - -cd dfr -git pull -cd ../geeklib -git pull -cd ../lilith -git pull +cd ~/Projects/dfr && git fetch --all +cd ~/Projects/geeklib && git fetch --all +cd ~/Projects/lilith && git fetch --all