From dd3640586e6b81b9d387b98c5d5b0a068273a755 Mon Sep 17 00:00:00 2001 From: Ismo Vuorinen Date: Sat, 1 Apr 2023 22:26:03 +0300 Subject: [PATCH] Dropped dotbot-ifplatform and dotbot-golang --- .gitmodules | 10 ---------- dotbot-golang | 1 - dotbot-ifplatform | 1 - install | 4 +--- install.conf.yaml | 12 +----------- scripts/install-go-packages.sh | 30 ++++++++++++++++++++++++++++++ 6 files changed, 32 insertions(+), 26 deletions(-) delete mode 160000 dotbot-golang delete mode 160000 dotbot-ifplatform create mode 100755 scripts/install-go-packages.sh diff --git a/.gitmodules b/.gitmodules index 29be075..a3fb187 100644 --- a/.gitmodules +++ b/.gitmodules @@ -13,21 +13,11 @@ url = https://github.com/wonderbeyond/dotbot-if.git ignore = dirty -[submodule "dotbot-ifplatform"] - path = dotbot-ifplatform - url = https://github.com/ssbanerje/dotbot-ifplatform.git - ignore = dirty - [submodule "dotbot-gh-extension"] path = dotbot-gh-extension url = https://github.com/fundor333/dotbot-gh-extension.git ignore = dirty -[submodule "dotbot-golang"] - path = dotbot-golang - url = https://github.com/delicb/dotbot-golang.git - ignore = dirty - [submodule "config/nvim"] path = config/nvim url = https://github.com/AstroNvim/AstroNvim.git diff --git a/dotbot-golang b/dotbot-golang deleted file mode 160000 index 4fa60bd..0000000 --- a/dotbot-golang +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 4fa60bd487726a05e1180a3d3d153de7cb6a042b diff --git a/dotbot-ifplatform b/dotbot-ifplatform deleted file mode 160000 index e35b5c0..0000000 --- a/dotbot-ifplatform +++ /dev/null @@ -1 +0,0 @@ -Subproject commit e35b5c0d7149d97ccecc8676a07895f35add725c diff --git a/install b/install index b498267..2f39ad0 100755 --- a/install +++ b/install @@ -15,9 +15,7 @@ git submodule update --init --recursive "${BASEDIR}/${DOTBOT_DIR}/${DOTBOT_BIN}" \ -d "${BASEDIR}" \ --plugin-dir=dotbot-brew \ - --plugin-dir=dotbot-gh-extension \ - --plugin-dir=dotbot-golang \ --plugin-dir=dotbot-if \ - -p dotbot-if/if.py \ + --plugin-dir=dotbot-gh-extension \ -c "${CONFIG}" \ "${@}" diff --git a/install.conf.yaml b/install.conf.yaml index 505b857..7583cbd 100644 --- a/install.conf.yaml +++ b/install.conf.yaml @@ -41,17 +41,7 @@ prefix: "." - shell: - [git submodule update --init --recursive --force] - - [chsh -s $(which zsh), Making zsh the default shell] -- ifmacos: - - shell: - - [bash scripts/set-macos-defaults.sh] - - brewfile: - - Brewfile -# Go packages what should be included in every system -- go: - - github.com/skx/sysbox@latest - - github.com/dotzero/git-profile - - github.com/google/yamlfmt/cmd/yamlfmt@latest + - bash scripts/install-go-packages.sh # hosts! ## hosts: air - if: diff --git a/scripts/install-go-packages.sh b/scripts/install-go-packages.sh new file mode 100755 index 0000000..8a24419 --- /dev/null +++ b/scripts/install-go-packages.sh @@ -0,0 +1,30 @@ +#!/usr/bin/env bash +# Install Go packages +# +# shellcheck source=shared.sh +source "$HOME/.dotfiles/scripts/shared.sh" + +if ! command -v go &> /dev/null; then + msg "go hasn't been installed yet." +else + packages=( + # sysadmin/scripting utilities, distributed as a single binary + github.com/skx/sysbox@latest + github.com/dotzero/git-profile@latest + github.com/google/yamlfmt/cmd/yamlfmt@latest + ) + + for pkg in "${packages[@]}"; do + # Trim spaces + pkg=${pkg// /} + # Skip comments + if [[ ${pkg:0:1} == "#" ]]; then continue; fi + + msg_run "Installing go package:" "$pkg" + go install "$pkg" + echo "" + done + + msg_ok "Done" + +fi