diff --git a/tools/install.sh b/tools/install.sh index a061d82..fb121f7 100644 --- a/tools/install.sh +++ b/tools/install.sh @@ -32,8 +32,15 @@ sh $HOME/.dotfiles/tools/relink.sh cd $CURRENTDIR +if [[ $(uname) = "Darwin"]] +then + sh tools/mac.sh +fi + echo "${GREEN}Dotfiles installed and linked.$DEFAULTC" read -p "Would you like to configure git? (y/N): " answer if [[ $answer = [Yy] ]]; then sh tools/git.sh -fi \ No newline at end of file +fi + +exec zsh \ No newline at end of file diff --git a/tools/mac.sh b/tools/mac.sh new file mode 100644 index 0000000..d13bd8f --- /dev/null +++ b/tools/mac.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +GREEN="\033[32m" +RED="\033[31m" +DEFAULTC="\033[0m" + +# configuring mac-only things + +# installing homebrew + +echo "${GREEN}Installing Homebrew${DEFAULTC}" +/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + +if [ "$(arch)" == "arm64" ] +then + HOMEBREW_PREFIX="/opt/homebrew" +else + HOMEBREW_PREFIX="/usr/local/homebrew" +fi +echo "eval \"\$($HOMEBREW_PREFIX/bin/brew shellenv)\"" >> $HOME/.zprofile +brew install pinentry-mac gpg2 +echo "pinentry-program $HOMEBREW_PREFIX/bin/pinentry-mac" >> $HOME/.gnupg/gpg-agent.conf