-
Notifications
You must be signed in to change notification settings - Fork 1
/
terminal-setup.sh
63 lines (49 loc) · 1.59 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
56
57
58
59
60
61
62
63
#!/usr/bin/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
# Check .gnupg dir
if [ ! -d ~/.gnupg ]; then
mkdir ~/.gnupg
fi
# Fetch oh-my-zsh
if [ ! -d ~/.oh-my-zsh ]; then
echo "Getting oh-my-zsh.."
git clone https://github.com/ohmyzsh/ohmyzsh.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 ]; then
echo "Update oh-my-zsh custom.."
cd ~/.oh-my-zsh/custom
curl --silent -O https://raw.githubusercontent.com/jonikanerva/dotfiles/main/joni-two.zsh-theme
curl --silent -O https://raw.githubusercontent.com/jonikanerva/dotfiles/main/joni.zsh
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
echo "Getting .rc files.."
cd ~
curl --silent -O https://raw.githubusercontent.com/jonikanerva/dotfiles/main/.zshrc
curl --silent -O https://raw.githubusercontent.com/jonikanerva/dotfiles/main/.gitignore
curl --silent -O https://raw.githubusercontent.com/jonikanerva/dotfiles/main/.gitconfig
curl --silent -O https://raw.githubusercontent.com/jonikanerva/dotfiles/main/ruby/.gemrc
cd ~/.gnupg
curl --silent -O https://raw.githubusercontent.com/jonikanerva/dotfiles/main/gpg-agent.conf
echo "Done."
echo