Browse Source

Add brew.sh

mac-init
Ein Verne 4 years ago
parent
commit
4555ace5c2
No known key found for this signature in database
GPG Key ID: 926634D64ACAD792
  1. 5
      Brewfile
  2. 20
      bootstrap.sh
  3. 46
      git/global.gitconfig

5
Brewfile

@ -8,6 +8,7 @@ tap "homebrew/cask-versions"
tap "adoptopenjdk/openjdk" tap "adoptopenjdk/openjdk"
# primitives # primitives
# https://en.wikipedia.org/wiki/List_of_GNU_Core_Utilities_commands
brew "coreutils" brew "coreutils"
brew "git" brew "git"
brew "neovim" brew "neovim"
@ -90,6 +91,10 @@ cask "neteasemusic"
cask "google-trends" cask "google-trends"
cask "appcleaner" cask "appcleaner"
cask "oversight" cask "oversight"
# open broadcaster software
cask "obs"
# note-taking app
cask "obsidian"
# cask "dropbox" # cask "dropbox"
cask "nitroshare" cask "nitroshare"
cask "qmk-toolbox" cask "qmk-toolbox"

20
bootstrap.sh

@ -12,6 +12,9 @@ fi
echo "Setup hostname" echo "Setup hostname"
sudo scutil --set HostName mac sudo scutil --set HostName mac
echo "Install from brew.sh"
bash brew.sh
echo "Install with Brew Bundle" echo "Install with Brew Bundle"
set +e set +e
brew bundle brew bundle
@ -22,11 +25,11 @@ mkdir -p ~/projects
echo "Setup Git" echo "Setup Git"
ln -s ./git/work.gitconfig ~/projects/.gitconfig ln -s ./git/work.gitconfig ~/projects/.gitconfig
if [ -f ~/.gitconfig ]; then if [ -f $HOME/.gitconfig ]; then
cat ~/.gitconfig cat $HOME/.gitconfig
mv ~/.gitconfig ~/.gitconfig.bak mv $HOME/.gitconfig $HOME/.gitconfig.bak
fi fi
ln -s ./git/global.gitconfig ~/.gitconfig ln -s $PWD/git/global.gitconfig $HOME/.gitconfig
# echo "Setup Bash" # echo "Setup Bash"
# sudo cp ./motd /etc/motd # sudo cp ./motd /etc/motd
@ -42,6 +45,15 @@ if [ -f ~/.zshrc ]; then
fi fi
ln -s $PWD/.zshrc $HOME/.zshrc ln -s $PWD/.zshrc $HOME/.zshrc
echo "Setup Vim"
ln -s $PWD/.vimrc $HOME/.vimrc
echo "Setup Tmux"
ln -s $PWD/tmux/.tmux.conf $HOME/.tmux.conf
ln -s $PWD/tmux/.tmux.conf.local $HOME/.tmux.conf.local
ls -al $HOME
echo "Setup applications" echo "Setup applications"
echo "- fzf" echo "- fzf"
$(brew --prefix)/opt/fzf/install $(brew --prefix)/opt/fzf/install

46
git/global.gitconfig

@ -1,11 +1,13 @@
[user] [user]
name = Ein Verne
email = [email protected] email = [email protected]
[core] name = Ein Verne
editor = vim signingkey = 926634D64ACAD792
autocrlf = input [push]
default = matching
[http]
postBuffer = 524288000
[alias] [alias]
unstage = reset HEAD --
a = add a = add
b = branch b = branch
c = commit c = commit
@ -71,7 +73,12 @@
# #
# git config --global branch.autosetuprebase always # git config --global branch.autosetuprebase always
# #
pr = pull --rebase # pr = pull --rebase
pr="!f() { \
BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD); \
git push -u origin $BRANCH_NAME; \
hub pull-request; \
};f "
### rebase ### ### rebase ###
@ -97,25 +104,20 @@
[branch] [branch]
autosetuprebase = always autosetuprebase = always
[core]
editor = vim
autocrlf = input
quotepath = false
[pull] [pull]
rebase = true rebase = true
[push]
default = matching [merge]
[gc]
autoDetach = false
[gpg]
program = gpg2
[commit]
gpgSign = false
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[diff]
tool = meld tool = meld
[difftool] conflictstyle = diff3
prompt = false [mergetool "meld"]
cmd = meld $LOCAL $BASE $REMOTE --output=$MERGED --auto-merge
[gpg]
program = gpg
[includeIf "gitdir:~/projects/"] [includeIf "gitdir:~/projects/"]
path = ~/projects/.gitconfig path = ~/projects/.gitconfig

Loading…
Cancel
Save