-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·37 lines (29 loc) · 1.22 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
#!/bin/bash
# Backup existing files
if [ -f ~/.zshrc ]; then
mv ~/.zshrc ~/.zshrc.bak
fi
if [ -f ~/.p10k.zsh ]; then
mv ~/.p10k.zsh ~/.p10k.zsh.bak
fi
if [ -f ~/bin/shopify-dev ]; then
mv ~/bin/shopify-dev ~/bin/shopify-dev.bak
fi
if [ -f ~/Library/Application\ Support/Sublime\ Merge/Packages/User/Default.sublime-commands ]; then
mv ~/Library/Application\ Support/Sublime\ Merge/Packages/User/Default.sublime-commands ~/Library/Application\ Support/Sublime\ Merge/Packages/User/Default.sublime-commands.bak
fi
if [ -f ~/.gitconfig ]; then
mv ~/.gitconfig ~/.gitconfig.bak
fi
# Copy new files
cp .zshrc ~/.zshrc
cp .p10k.zsh ~/.p10k.zsh
cp shopify-dev ~/bin/shopify-dev
cp Default.sublime-commands ~/Library/Application\ Support/Sublime\ Merge/Packages/User/Default.sublime-commands
cp .gitconfig ~/.gitconfig
# Permissions
chmod +x ~/bin/shopify-dev
# Pre-reqs
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
git clone --depth=1 https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k