-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·48 lines (36 loc) · 948 Bytes
/
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
#!/bin/bash
DOT_FILES_DIR="$( cd "$( dirname "$0" )" && pwd )"
echo "setup zsh"
echo "download last antigen script version"
curl -L git.io/antigen > antigen.zsh
if [ "$SHELL" = "/bin/zsh" ]
then
echo "zsh is already the default shell"
else
echo "check if zsh is already installed"
if which "zsh"
then
echo "zsh is already installed"
else
echo "zsh is not installed yet..."
echo ""
sudo apt-get install zsh
echo ""
echo "zsh has been installed"
fi
echo "change default shell to zsh"
if grep -q "zsh" /etc/shells
then
echo "zsh is already an authorized shell"
else
echo "make zsh an authorized shell"
command -v zsh | sudo tee -a /etc/shells
fi
chsh -s $(which zsh)
echo "zsh is now the default shell"
echo "Please, log off and log in"
fi
echo "make links between $DOT_FILES_DIR and $HOME"
echo ".zshrc"
rm -f ~/.zshrc && ln -sf "$DOT_FILES_DIR/.zshrc" ~/.zshrc
echo "done"