Skip to content

Commit

Permalink
feat: Adding golang installation
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Boutour <[email protected]>
  • Loading branch information
ViBiOh committed Nov 25, 2024
1 parent ac556d5 commit 3cbac5b
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 15 deletions.
6 changes: 3 additions & 3 deletions installations/docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ clean() {

sudo rm -rf "${HOME}/.docker" "${HOME}/.lima" "${HOME}/.colima"

if ! [[ ${OSTYPE} =~ ^darwin ]]; then
rm-rf "${HOME}/Library/Caches/colima"
rm-rf "${HOME}/Library/Caches/lima"
if [[ ${OSTYPE} =~ ^darwin ]]; then
rm -rf "${HOME}/Library/Caches/colima"
rm -rf "${HOME}/Library/Caches/lima"
fi
}

Expand Down
8 changes: 4 additions & 4 deletions installations/golang.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ clean() {
rm -rf "${HOME}/.dlv"
rm -rf "${HOME}/pprof"

if ! [[ ${OSTYPE} =~ ^darwin ]]; then
rm-rf "${HOME}/Library/Caches/go-build"
rm-rf "${HOME}/Library/Caches/golangci-lint"
rm-rf "${HOME}/Library/Caches/gopls"
if [[ ${OSTYPE} =~ ^darwin ]]; then
rm -rf "${HOME}/Library/Caches/go-build"
rm -rf "${HOME}/Library/Caches/golangci-lint"
rm -rf "${HOME}/Library/Caches/gopls"
fi
}

Expand Down
17 changes: 17 additions & 0 deletions installations/jetbrains.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env bash

set -o nounset -o pipefail -o errexit

clean() {
if command -v gpgconf >/dev/null 2>&1; then
gpgconf --kill gpg-agent
fi
}

install() {
packages_install "goland"

if [[ ${OSTYPE} =~ ^darwin ]]; then
rm -rf "${HOME}/Library/JetBrains"
fi
}
4 changes: 2 additions & 2 deletions installations/node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ clean() {
rm -rf "${HOME}/.npm"
rm -rf "${HOME}/.v8flags."*

if ! [[ ${OSTYPE} =~ ^darwin ]]; then
rm-rf "${HOME}/Library/Caches/Yarn"
if [[ ${OSTYPE} =~ ^darwin ]]; then
rm -rf "${HOME}/Library/Caches/Yarn"
fi
}

Expand Down
6 changes: 3 additions & 3 deletions installations/python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ script_dir() {
clean() {
rm -rf "${HOME}/.python_history"

if ! [[ ${OSTYPE} =~ ^darwin ]]; then
rm-rf "${HOME}/Library/Caches/pip"
rm-rf "${HOME}/Library/Caches/pip-tools"
if [[ ${OSTYPE} =~ ^darwin ]]; then
rm -rf "${HOME}/Library/Caches/pip"
rm -rf "${HOME}/Library/Caches/pip-tools"
fi
}

Expand Down
6 changes: 3 additions & 3 deletions installations/sublime.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ script_dir() {
}

clean() {
if ! [[ ${OSTYPE} =~ ^darwin ]]; then
rm-rf "${HOME}/Library/Caches/Sublime Text"
rm-rf "${HOME}/Library/Caches/Sublime Merge"
if [[ ${OSTYPE} =~ ^darwin ]]; then
rm -rf "${HOME}/Library/Caches/Sublime Text"
rm -rf "${HOME}/Library/Caches/Sublime Merge"
fi
}

Expand Down
5 changes: 5 additions & 0 deletions sources/jetbrains.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash

if [[ -d "/Applications/GoLand.app/Contents/MacOS" ]]; then
export PATH="/Applications/GoLand.app/Contents/MacOS:${PATH}"
fi

0 comments on commit 3cbac5b

Please sign in to comment.