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"
# 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"

20
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

46
git/global.gitconfig

@ -1,11 +1,13 @@
[user]
name = Ein Verne
email = [email protected]
[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,7 +73,12 @@
#
# 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 ###
@ -97,25 +104,20 @@
[branch]
autosetuprebase = always
[core]
editor = vim
autocrlf = input
quotepath = false
[pull]
rebase = true
[push]
default = matching
[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]
[merge]
tool = meld
[difftool]
prompt = false
conflictstyle = diff3
[mergetool "meld"]
cmd = meld $LOCAL $BASE $REMOTE --output=$MERGED --auto-merge
[gpg]
program = gpg
[includeIf "gitdir:~/projects/"]
path = ~/projects/.gitconfig

Loading…
Cancel
Save