mirror of
https://github.com/ivabus/dotfiles
synced 2024-11-21 23:55:07 +03:00
Create macOS-specific settings
This commit is contained in:
parent
851ca70861
commit
5a972645cb
2 changed files with 30 additions and 1 deletions
|
@ -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
|
||||
|
||||
exec zsh
|
22
tools/mac.sh
Normal file
22
tools/mac.sh
Normal file
|
@ -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
|
Loading…
Reference in a new issue