From fe351483777c8d053d9f8b584278a4c2b162db0e Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Sat, 1 Nov 2025 21:25:17 -0400 Subject: Update install scripts for macos and linux and use sh --- shlib/bootstrap.sh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 shlib/bootstrap.sh (limited to 'shlib/bootstrap.sh') diff --git a/shlib/bootstrap.sh b/shlib/bootstrap.sh new file mode 100644 index 0000000..b2d6bb9 --- /dev/null +++ b/shlib/bootstrap.sh @@ -0,0 +1,29 @@ +# shellcheck shell=sh +[ -n "${DOTFILES_BOOTSTRAP_LOADED}" ] && return +readonly DOTFILES_BOOTSTRAP_LOADED=1 + +. "$(dirname "$0")/shlib/homebrew.sh" +. "$(dirname "$0")/shlib/log.sh" +. "$(dirname "$0")/shlib/prompt.sh" + +bootstrap_macos() { + if ! homebrew_is_installed; then + if prompt_for_confirmation "Homebrew not found. Would you like to install Homebrew?"; then + homebrew_install + else + log_error "Cannot continue without homebrew installed." + return 1 + fi + fi + + log_info "Found homebrew installation. Installing Brewfile.." + (cd homebrew && brew bundle) + log_info "Brewfile successfully installed. Moving to linking dotfiles.." + + sudo ln -sf "$HOME/bin/get-password" /usr/local/bin/get-password + sudo ln -sf "$(which op)" /usr/local/bin/op +} + +bootstrap_linux() { + return 0 +} -- cgit v1.2.3