Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix initial setup scenario #17

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions fzf/install
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ set -o pipefail

source "../script/lib/utils"

use_brew
brew install fzf

info "Install fzf key bindings and completion…"
Expand Down
4 changes: 2 additions & 2 deletions homebrew/install
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ source "$SCRIPT_DIR/../script/lib/utils"

if ! command -v brew >/dev/null; then
info "Install homebrew…"
/usr/bin/env bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
yes "" | INTERACTIVE=1 /usr/bin/env bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

if [ "$(uname -m)" = "arm64" ]; then
info "Initialize homebrew shell…"
eval "$(/opt/homebrew/bin/brew shellenv)"
use_brew
fi
else
info "Update homebrew…"
Expand Down
4 changes: 4 additions & 0 deletions script/lib/utils
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,7 @@ function create_symlinks() {
symlink "$src" "$dest"
done
}

function use_brew() {
eval "$(/opt/homebrew/bin/brew shellenv)"
}
3 changes: 3 additions & 0 deletions script/setup
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,7 @@ info "Set name to '$name'…"
sudo scutil --set ComputerName "$name"
sudo scutil --set LocalHostName "$name"

info "Create ~/.config directory if it does not exist…"
mkdir -p ~/.config

"$SCRIPT_DIR/install"
2 changes: 2 additions & 0 deletions zsh/install
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ set -o pipefail

source "../script/lib/utils"

use_brew

HOMEBREW_ZSH="$(brew --prefix)/bin/zsh"
readonly HOMEBREW_ZSH

Expand Down