-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup_zsh.sh
45 lines (40 loc) · 987 Bytes
/
setup_zsh.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
#!/bin/bash
DIR=$(pwd)
echo set .zshrc
ln -si $DIR/.zshrc ~/.zshrc
if ! command -v zsh &> /dev/null
then
echo install zsh
if [ -x "$(command -v pacman)" ]; then
# sudo pacman -S zsh-syntax-highlighting
echo not implemented
elif [ -x "$(command -v apt-get)" ];then
sudo apt install zsh
echo
elif [[ "$OSTYPE" == "darwin"* ]]; then
echo not implemented
fi
fi
if ! command -v zsh &> /dev/null
then
echo zsh not found
exit 3
fi
echo install zsh plugin
mkdir -p ~/.antigen
curl -L git.io/antigen > ~/.antigen/antigen.zsh
chmod -R 755 ~/.antigen
if [ -x "$(command -v pacman)" ]; then
# sudo pacman -S zsh-syntax-highlighting
echo
elif [ -x "$(command -v apt-get)" ];then
# sudo apt install zsh-syntax-highlighting
echo
sudo apt install autojump
elif [[ "$OSTYPE" == "darwin"* ]]; then
echo
brew install coreutils autojump
compaudit
sudo chown root:staff -R /opt/homebrew/share/zsh/
sudo chmod 755 -R /opt/homebrew/share/zsh/
fi