diff --git a/.Brewfile b/.Brewfile index 65747ec..0ca7458 100644 --- a/.Brewfile +++ b/.Brewfile @@ -9,10 +9,16 @@ brew "hadolint" brew "jq" brew "mdbook" brew "mkcert" -brew "sqlite" brew "rclone" brew "shellcheck" +brew "sqlite" brew "tea" brew "ykman" brew "drone/drone/drone" brew "oven-sh/bun/bun" + +if OS.mac? + cask "logseq" + cask "slack" + cask "visual-studio-code" +end diff --git a/.profile b/.profile index 285225f..8391bc3 100644 --- a/.profile +++ b/.profile @@ -1,11 +1,20 @@ export EDITOR=nano export PATH="$HOME/.local/bin:$PATH" -export HOMEBREW_PREFIX="/home/linuxbrew/.linuxbrew"; -export HOMEBREW_CELLAR="/home/linuxbrew/.linuxbrew/Cellar"; -export HOMEBREW_REPOSITORY="/home/linuxbrew/.linuxbrew/Homebrew"; -export PATH="/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin${PATH+:$PATH}"; -export MANPATH="/home/linuxbrew/.linuxbrew/share/man${MANPATH+:$MANPATH}:"; -export INFOPATH="/home/linuxbrew/.linuxbrew/share/info:${INFOPATH:-}"; export DENO_INSTALL_ROOT="${HOME}/.local" [ -f "$HOME/.cargo/env" ] && . "$HOME/.cargo/env" [ -n "$BASH_VERSION" ] && . "$HOME/.bashrc" +if [ -d /usr/local/Homebrew ]; then + export HOMEBREW_PREFIX="/usr/local" + export HOMEBREW_CELLAR="/usr/local/Cellar" + export HOMEBREW_REPOSITORY="/usr/local/Homebrew" + export PATH="/usr/local/bin:/usr/local/sbin${PATH+:$PATH}" + export MANPATH="/usr/local/share/man${MANPATH+:$MANPATH}:" + export INFOPATH="/usr/local/share/info:${INFOPATH:-}" +else + export HOMEBREW_PREFIX="/home/linuxbrew/.linuxbrew" + export HOMEBREW_CELLAR="/home/linuxbrew/.linuxbrew/Cellar" + export HOMEBREW_REPOSITORY="/home/linuxbrew/.linuxbrew/Homebrew" + export PATH="/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin${PATH+:$PATH}" + export MANPATH="/home/linuxbrew/.linuxbrew/share/man${MANPATH+:$MANPATH}:" + export INFOPATH="/home/linuxbrew/.linuxbrew/share/info:${INFOPATH:-}" +fi diff --git a/homebrew/install b/homebrew/install index 97ea1c0..8895b3c 100755 --- a/homebrew/install +++ b/homebrew/install @@ -8,9 +8,14 @@ function install_homebrew_packages() { sudo --user="#$uid" \ NONINTERACTIVE=1 \ bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" - sudo --user="#$uid" \ - /home/linuxbrew/.linuxbrew/bin/brew bundle --global + if [[ -x /usr/local/bin/brew ]]; then + sudo --user="#$uid" \ + /usr/local/bin/brew bundle --global + else + sudo --user="#$uid" \ + /home/linuxbrew/.linuxbrew/bin/brew bundle --global + fi } -[[ $(uname -sm) =~ ^(Linux x86_64)$ ]] \ - && install_homebrew_packages +[[ $(uname -sm) =~ ^(Linux x86_64|Darwin x86_64)$ ]] && + install_homebrew_packages