From 4555ace5c254b7fb901ea90370eec0acd4c1c73e Mon Sep 17 00:00:00 2001 From: Ein Verne Date: Sun, 19 Jul 2020 09:30:10 +0800 Subject: [PATCH] Add brew.sh --- Brewfile | 5 ++++ bootstrap.sh | 20 ++++++++++++---- brew.sh | 2 +- git/global.gitconfig | 54 +++++++++++++++++++++++--------------------- 4 files changed, 50 insertions(+), 31 deletions(-) diff --git a/Brewfile b/Brewfile index 159e04a..840462f 100644 --- a/Brewfile +++ b/Brewfile @@ -8,6 +8,7 @@ tap "homebrew/cask-versions" tap "adoptopenjdk/openjdk" # primitives +# https://en.wikipedia.org/wiki/List_of_GNU_Core_Utilities_commands brew "coreutils" brew "git" brew "neovim" @@ -90,6 +91,10 @@ cask "neteasemusic" cask "google-trends" cask "appcleaner" cask "oversight" +# open broadcaster software +cask "obs" +# note-taking app +cask "obsidian" # cask "dropbox" cask "nitroshare" cask "qmk-toolbox" diff --git a/bootstrap.sh b/bootstrap.sh index 293e17c..c17760c 100644 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -12,6 +12,9 @@ fi echo "Setup hostname" sudo scutil --set HostName mac +echo "Install from brew.sh" +bash brew.sh + echo "Install with Brew Bundle" set +e brew bundle @@ -22,11 +25,11 @@ mkdir -p ~/projects echo "Setup Git" ln -s ./git/work.gitconfig ~/projects/.gitconfig -if [ -f ~/.gitconfig ]; then - cat ~/.gitconfig - mv ~/.gitconfig ~/.gitconfig.bak +if [ -f $HOME/.gitconfig ]; then + cat $HOME/.gitconfig + mv $HOME/.gitconfig $HOME/.gitconfig.bak fi -ln -s ./git/global.gitconfig ~/.gitconfig +ln -s $PWD/git/global.gitconfig $HOME/.gitconfig # echo "Setup Bash" # sudo cp ./motd /etc/motd @@ -42,6 +45,15 @@ if [ -f ~/.zshrc ]; then fi 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 "- fzf" $(brew --prefix)/opt/fzf/install diff --git a/brew.sh b/brew.sh index 44f4f7a..e5a54a8 100644 --- a/brew.sh +++ b/brew.sh @@ -29,7 +29,7 @@ brew install gmp brew install ack brew install git -brew install git-lfs +brew install git-lfs brew install imagemagick --with-webp brew install p7zip brew install ssh-copy-id diff --git a/git/global.gitconfig b/git/global.gitconfig index b37fc6f..bb38b3d 100644 --- a/git/global.gitconfig +++ b/git/global.gitconfig @@ -1,11 +1,13 @@ [user] - name = Ein Verne email = einverne@gmail.com -[core] - editor = vim - autocrlf = input - + name = Ein Verne + signingkey = 926634D64ACAD792 +[push] + default = matching +[http] + postBuffer = 524288000 [alias] + unstage = reset HEAD -- a = add b = branch c = commit @@ -71,16 +73,21 @@ # # 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 - forward-port local commits to the updated upstream head. rb = rebase - + # rebase - continue the rebasing process after resolving a conflict manually and updating the index with the resolution. rbc = rebase --continue - + # rebase - restart the rebasing process by skipping the current patch. rbs = rebase --skip @@ -97,25 +104,20 @@ [branch] autosetuprebase = always +[core] + editor = vim + autocrlf = input + quotepath = false [pull] rebase = true -[push] - default = matching -[gc] - autoDetach = false + +[merge] + tool = meld + conflictstyle = diff3 +[mergetool "meld"] + cmd = meld $LOCAL $BASE $REMOTE --output=$MERGED --auto-merge [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 -[difftool] - prompt = false + program = gpg [includeIf "gitdir:~/projects/"] path = ~/projects/.gitconfig