-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathquick-install.sh
More file actions
62 lines (54 loc) · 2.01 KB
/
Copy pathquick-install.sh
File metadata and controls
62 lines (54 loc) · 2.01 KB
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
# Create GitHub/mine/scripts directory
if ! [[ -d $HOME/GitHub/mine/scripts ]]; then
mkdir $HOME/GitHub/mine/scripts
fi
# Get openssh, if not pre-installed and Zsh
if ! `which ssh >/dev/null 2>&1`; then
sudo emerge -av openssh
fi
if ! [[ -f /bin/zsh ]]; then
sudo emerge -av app-shells/zsh
fi
# Clone funtoo-scripts repo
if ! [[ -d $HOME/GitHub/mine/scripts/funtoo-scripts ]]; then
git clone https://github.com/fusion809/funtoo-scripts $HOME/GitHub/mine/scripts/funtoo-scripts
# Copy across
cp -a $HOME/GitHub/mine/scripts/funtoo-scripts/{Shell,.bashrc,.zshrc} $HOME/
sudo cp -a $HOME/GitHub/mine/scripts/funtoo-scripts/root/{Shell,.bashrc,.zshrc} /root/
else
cd $HOME/GitHub/mine/scripts/funtoo-scripts
git pull origin master
cd -
# Copy across
cp -a $HOME/GitHub/mine/scripts/funtoo-scripts/{Shell,.bashrc,.zshrc} $HOME/
sudo cp -a $HOME/GitHub/mine/scripts/funtoo-scripts/root/{Shell,.bashrc,.zshrc} /root/
fi
if ! [[ -d $HOME/.oh-my-zsh ]]; then
# git clone oh-my-zsh
git clone https://github.com/robbyrussell/oh-my-zsh $HOME/.oh-my-zsh
else
cd $HOME/.oh-my-zsh
git pull origin master
cd -
fi
if ! [[ -d $HOME/GitHub/mine/scripts/zsh-theme ]]; then
# Get my self-made zsh-themes
git clone https://github.com/fusion809/zsh-theme $HOME/GitHub/mine/scripts/zsh-theme
cp -a $HOME/GitHub/mine/scripts/zsh-theme/*.zsh-theme $HOME/.oh-my-zsh/themes/
else
cd $HOME/GitHub/mine/scripts/zsh-theme
git pull origin master
cd -
cp -a $HOME/GitHub/mine/scripts/zsh-theme/*.zsh-theme $HOME/.oh-my-zsh/themes/
fi
if ! [[ -d $HOME/.oh-my-zsh/plugins/zsh-syntax-highlighting ]]; then
# Get zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-syntax-highlighting $HOME/.oh-my-zsh/plugins/zsh-syntax-highlighting
fi
if ! [[ -d $HOME/.oh-my-zsh/plugins/zsh-history-substring-search ]]; then
git clone https://github.com/zsh-users/zsh-history-substring-search $HOME/.oh-my-zsh/plugins/zsh-history-substring-search
fi
# Change default login shell to Zsh
chsh -s /bin/zsh
sudo chsh -s /bin/zsh
/bin/zsh