-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
136 lines (108 loc) · 3.48 KB
/
install.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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
#!/bin/bash
# Check if running in bash shell vs zsh shell
if [ "$SHELL" == "/bin/bash" ]; then
echo "Running in bash shell"
# Check if running in zsh shell
elif [ "$SHELL" == "/bin/zsh" ]; then
echo "Running in zsh shell"
# Otherwise, unknown shell
else
# echo "Error: Unknown shell"
fi
# Detect if running on Mac or Linux
if [ "$(uname)" == "Darwin" ]; then
# Running on Mac, so run the Mac-specific commands
# Make sure we’re using the latest Homebrew
brew update
brew upgrade
# Install xcode command-line tools
xcode-select --install
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
brew bundle install
# GNU core utilities (those that come with OS X are outdated)
brew install coreutils
brew install moreutils
brew install findutils
brew install gnu-sed --with-default-names
# upgrade bash
brew install bash
brew install bash-completion
brew install homebrew/completions/brew-cask-completion
# Install wget with IRI support
brew install wget --with-iri
# Install other useful binaries
brew install ffmpeg --with-libvpx
brew install fzf
brew install git
brew install gnupg
brew install imagemagick --with-webp
brew install node # This installs `npm` too using the recommended installation method
brew install rename
brew install svgo
brew install the_silver_searcher
brew install terminal-notifier
brew install awscli
# Install more recent versions of some OS X tools
brew install vim --with-override-system-vi
brew install ripgrep
brew install --cask visual-studio-code
# Remove outdated versions from the cellar
brew cleanup
npm install -g prettier
npm install -g ngrok
npm install -g typescript
npm install -g javascript-typescript-langserver
else
# Running on Linux, so do these other things instead
:
fi
# install nix
# curl -L https://nixos.org/nix/install | sh
# source nix
# . ~/.nix-profile/etc/profile.d/nix.sh
# install packages
# nix-env -iA \
# nixpkgs.zsh \
# nixpkgs.antibody \
# nixpkgs.git \
# nixpkgs.neovim \
# nixpkgs.tmux \
# nixpkgs.stow \
# nixpkgs.yarn \
# nixpkgs.fzf \
# nixpkgs.ripgrep \
# nixpkgs.bat \
# nixpkgs.gnumake \
# nixpkgs.gcc \
# nixpkgs.direnv
# stow dotfiles
#stow git
#stow nvim
#stow tmux
#stow zsh
# add zsh as a login shell
#command -v zsh | sudo tee -a /etc/shells
# use zsh as default shell
#sudo chsh -s $(which zsh) $USER
# bundle zsh plugins
#antibody bundle < ~/.zsh_plugins.txt > ~/.zsh_plugins.sh
# install neovim plugins
#nvim --headless +PlugInstall +qall
# Use kitty terminal on MacOS
[ `uname -s` = 'Darwin' ] && stow kitty
# Create symlinksß
ln -s ~/.dotfiles/.vimrc ~/.vimrc
ln -s ~/.dotfiles/.viminfo ~/.viminfo
ln -s ~/.dotfiles/.bashrc ~/.bashrc
ln -s ~/.dotfiles/.bash_profile ~/.bash_profile
ln -s ~/.dotfiles/.bash_login ~/.bash_login
ln -s ~/.dotfiles/.bash_logout ~/.bash_logout
ln -s ~/.dotfiles/.zshrc ~/.zshrc
ln -s ~/.dotfiles/.gitconfig ~/.gitconfig
ln -s ~/.dotfiles/.gitignore_global ~/.gitignore_global
if [ "$(uname)" == "Darwin" ]; then
ln -s /Users/julianwest/.dotfiles/.vscode/settings.json /Users/julianwest/Library/Application\ Support/Code/User/settings.json
ln -s /Users/julianwest/.dotfiles/.vscode/keybindings.json /Users/julianwest/Library/Application\ Support/Code/User/keybindings.json
ln -s /Users/julianwest/.dotfiles/.vscode/snippets/ /Users/julianwest/Library/Application\ Support/Code/User
else
fi