From f311c01a1b2672ab2c724674de8022e83988545e Mon Sep 17 00:00:00 2001 From: "Simen A. W. Olsen" Date: Fri, 27 Dec 2024 14:37:58 +0100 Subject: reorganize --- bootstrap.sh | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) (limited to 'bootstrap.sh') diff --git a/bootstrap.sh b/bootstrap.sh index e190a7d..368ef9d 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -1,4 +1,35 @@ #!/bin/bash -# Install Oh My Zsh -sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended +# Install Homebrew if not installed +if ! command -v brew >/dev/null 2>&1; then + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" +fi + +# Install GNU Stow +brew install stow + +# Install packages from Brewfile +cd apps && brew bundle + +# Create symlinks using stow +cd .. +stow zsh +stow git +stow apps +stow config +stow tmux + +# Install TPM for tmux +if [ ! -d "$HOME/.tmux/plugins/tpm" ]; then + git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm +fi + +# Configure macOS defaults +sh macos/macos + +# Setup Zsh +if [ ! -d "$HOME/.zsh-repos/znap" ]; then + git clone --depth 1 https://github.com/marlonrichert/zsh-snap.git ~/.zsh-repos/znap +fi + +echo "Setup complete! Please restart your terminal." -- cgit v1.2.3