forked from jonikanerva/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
terminal-setup.sh
executable file
·55 lines (46 loc) · 1.45 KB
/
terminal-setup.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
#!/usr/bin/env bash
echo
echo "Updating terminal settings"
echo
# Check we have Git
command -v git > /dev/null
if [[ $? != 0 ]]; then
echo "Install git first!"
exit
fi
# Check we have Curl
command -v curl > /dev/null
if [[ $? != 0 ]]; then
echo "Install curl first!"
exit
fi
# Fetch oh-my-zsh
if [ ! -d ~/.oh-my-zsh ]; then
echo "Getting oh-my-zsh.."
git clone https://github.com/ohmyzsh/oh-my-zsh.git ~/.oh-my-zsh --quiet
mkdir -p ~/.oh-my-zsh/custom/plugins
cd ~/.oh-my-zsh/custom/plugins
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git --quiet
fi
if [ -d ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting ]; then
echo "Update zsh syntax highlighting.."
cd ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting
git pull
fi
if [ -d ~/.oh-my-zsh ]; then
echo "Update oh-my-zsh custom.."
cd ~/.oh-my-zsh/custom
curl --silent --show-error -O https://raw.githubusercontent.com/jkytomak/dotfiles/master/jyri.zsh-theme
if [ -d ~/.oh-my-zsh/custom/plugins/zsh-yarn-completions ]; then
cd ~/.oh-my-zsh/custom/plugins/zsh-yarn-completions
git pull
else
git clone https://github.com/chrisands/zsh-yarn-completions ~/.oh-my-zsh/custom/plugins/zsh-yarn-completions
fi
fi
echo "Getting .rc files.."
cd ~
curl --silent --show-error -O https://raw.githubusercontent.com/jkytomak/dotfiles/master/.zshrc
curl --silent --show-error -O https://raw.githubusercontent.com/jkytomak/dotfiles/master/.gitconfig
echo "Done."
echo