-
Notifications
You must be signed in to change notification settings - Fork 0
/
install-dotfiles-osx.sh
executable file
·106 lines (90 loc) · 2.03 KB
/
install-dotfiles-osx.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
#!/bin/bash -x
packagesToCaskInstall=" \
iterm2 \
signal \
spotify \
virtualbox\
intellij-idea-ce \
meld \
"
packagesToInstall="\
jsawk \
ansible \
docker \
docker-compose \
fzf \
git \
kubectl \
nodejs \
npm \
neovim \
shellcheck \
the_silver_searcher \
thefuck \
jq \
"
function setupRCFile {
rcfile=~/."$1"
# Configure git
if [[ -f $rcfile ]]; then
mv "$rcfile" "$rcfile.bkp"
fi
ln -s "$HOME/$rcfile" "$HOME/src/github.com/tomwj/dotfiles/$1"
}
case "$(uname -s)" in
Darwin)
echo 'Mac OS X'
echo "Running on OSX"
if command -v brew; then
echo "Installing packages "
brew cask install $packagesToCaskInstall
brew install $packagesToInstall
else
echo "Please install brew"
exit
fi
;;
Linux)
echo 'Linux'
exit
;;
CYGWIN*|MINGW32*|MSYS*)
echo 'MS Windows'
exit
;;
# Add here more strings to compare
# See correspondence table at the bottom of this answer
*)
echo 'Other OS'
exit
;;
esac
echo "Setting up gh on zsh"
# Setup gh
mkdir -p ~/src/github.com/jdxcode/gh
cd ~/src/github.com/jdxcode || exit
git clone [email protected]:jdxcode/gh.git
typeset +gx -A GITHUB
GITHUB[user]=jdxcode
ln -s ~/src/github.com/jdxcode/gh/zsh/gh ~/.oh-my-zsh/custom/plugins/gh
source ~/.zshrc
# sudo apt-get update && sudo apt-get install -y apt-transport-https
# sudo apt-get install -y curl
# curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
# echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee -a /etc/apt/sources.list.d/kubernetes.list
# sudo apt-get update
# Install packages
# sudo pacman -S neovim $packagesToInstall
# python-pkg-resources mv ~/.config/nvim ~/.config/nvim.backup
# Configure nvim
#curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs \
# https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
nvim +PlugInstall +qall
pip install neovim
pip3 install neovim
npm install -g neovim
setupRCFile vimrc
setupRCFile nvim
setupRCFile gitconfig
setupRCFile bashrc
setupRCFile aignore