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. 2
      brew.sh
  4. 54
      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

2
brew.sh

@ -29,7 +29,7 @@ brew install gmp
brew install ack brew install ack
brew install git brew install git
brew install git-lfs brew install git-lfs
brew install imagemagick --with-webp brew install imagemagick --with-webp
brew install p7zip brew install p7zip
brew install ssh-copy-id brew install ssh-copy-id

54
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,16 +73,21 @@
# #
# 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 ###
# rebase - forward-port local commits to the updated upstream head. # rebase - forward-port local commits to the updated upstream head.
rb = rebase rb = rebase
# rebase - continue the rebasing process after resolving a conflict manually and updating the index with the resolution. # rebase - continue the rebasing process after resolving a conflict manually and updating the index with the resolution.
rbc = rebase --continue rbc = rebase --continue
# rebase - restart the rebasing process by skipping the current patch. # rebase - restart the rebasing process by skipping the current patch.
rbs = rebase --skip rbs = rebase --skip
@ -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] tool = meld
autoDetach = false conflictstyle = diff3
[mergetool "meld"]
cmd = meld $LOCAL $BASE $REMOTE --output=$MERGED --auto-merge
[gpg] [gpg]
program = gpg2 program = gpg
[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
[includeIf "gitdir:~/projects/"] [includeIf "gitdir:~/projects/"]
path = ~/projects/.gitconfig path = ~/projects/.gitconfig

Loading…
Cancel
Save