-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·94 lines (77 loc) · 3.11 KB
/
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#!/usr/bin/env bash
# Installation script for 10ft zsh theme
colorize() { CODE=$1; shift; echo -e '\033[0;'$CODE'm'$*'\033[0m'; }
bold() { echo -e "$(colorize 1 "$@")"; }
red() { echo -e "$(colorize '1;31' "$@")"; }
green() { echo -e "$(colorize 32 "$@")"; }
yellow() { echo -e "$(colorize 33 "$@")"; }
mkdir -p ~/.zsh
function preinstall(){
dir="${1}"
if [[ -d $dir ]]; then
check_compete=false
while [ $check_compete == 'false' ]
do
yellow "This will delete your old $dir install"
printf 'continue? (y/n): '
read response
response=$(echo $response | awk '{print toupper($0)}')
if [[ $response == 'Y' ]]; then
yellow "Removing old $dir install"
rm -rf "$dir"
check_compete=true
elif [[ $response == 'N' ]]; then
red "Aborting, manually backup your $dir and rerun"
exit 0
else
red "invalid input"
fi
done
fi
}
bold "You must install Powerline fonts before continuing https://github.com/gabrielelana/awesome-terminal-fonts"
yellow "Follow these Instructions for OSX: https://github.com/gabrielelana/awesome-terminal-fonts/wiki/OS-X"
printf 'continue? (y/n): '
read response
response=$(echo $response | awk '{print toupper($0)}')
if [[ $response != 'Y' ]]; then
exit 0
fi
bold "Installing oh-my-zsh"
preinstall ~/.oh-my-zsh
git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
bold "Installing oh-my-zsh-custom"
preinstall ~/.oh-my-zsh-custom
git clone https://github.com/RallySoftware/oh-my-zsh-custom.git ~/.oh-my-zsh-custom
bold "Installing zaw"
preinstall ~/.zsh/zaw
git clone https://github.com/brandon-fryslie/zaw.git ~/.zsh/zaw
bold "Installing auto-suggestions"
preinstall ~/.zsh/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.zsh/zsh-autosuggestions
bold "Installing zsh-completions"
preinstall ~/.zsh/zsh-completions
git clone https://github.com/zsh-users/zsh-completions ~/.zsh/zsh-completions
cp -fr ~/.zsh/zsh-completions ~/.oh-my-zsh-custom/plugins/
bold "Installing zsh-syntax-highlighting"
preinstall ~/.zsh/zsh-syntax-highlighting
git clone https://github.com/brandon-fryslie/zsh-syntax-highlighting.git ~/.zsh/zsh-syntax-highlighting
cp -fr ~/.zsh/zsh-syntax-highlighting ~/.oh-my-zsh-custom/plugins/
bold "Installing rad-plugins"
preinstall ~/.zsh/rad-plugins
git clone https://github.com/brandon-fryslie/rad-plugins.git ~/.zsh/rad-plugins
cp -fr ~/.zsh/rad-plugins/zaw ~/.oh-my-zsh-custom/plugins/
cp -fr ~/.zsh/rad-plugins/shell-tools ~/.oh-my-zsh-custom/plugins/
bold "Installing Powerlevel9k"
preinstall ~/.zsh/powerlevel9k
git clone https://github.com/bhilburn/powerlevel9k.git ~/.zsh/powerlevel9k
cp -fr ~/.zsh/powerlevel9k ~/.oh-my-zsh/themes/
if [[ -f ~/.zshrc ]]; then
ts=$(date +%s)
yellow "Backing up .zshrc to ~/.zshrc_$ts.backup"
cp ~/.zshrc "${HOME}/.zshrc_${ts}.backup"
fi
bold "Installing ~/.zshrc"
cp -f zshrc_template ~/.zshrc
green "Done! Open a new tab"
green "Recommended iterm Font: Meslo Regular from Nerd or Powerline fonts"