-
Notifications
You must be signed in to change notification settings - Fork 43
/
install.sh
executable file
·135 lines (108 loc) · 3.51 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
#!/usr/bin/env bash
# Author Maik Ellerbrock
# Github https://github.com/ellerbrock/
# Company Frapsoft
# Twitter @frapsoft
# Homepage https://frapsoft.com
# Version 1.1.7
# License MIT
# Information
# -----------
# Shell script to automate the installation steps provided in the tutorial
# Links
# -----
# - Tutorial: https://github.com/ellerbrock/tutorial-fish-shell-setup-osx/
# - Homebrew Website: http://brew.sh/
# - iTerm2 Website: https://www.iterm2.com/
# - iTerm2 Colour Schemes: http://iterm2colorschemes.com/
# - Fish Shell: https://fishshell.com/
# - Fisher: https://github.com/jorgebucaran/fisher
# - Powerline Fonts: https://github.com/powerline/fonts
# Configuration
# -------------
HOMEBREW="https://raw.githubusercontent.com/Homebrew/install/master/install"
COLOUR_THEMES="https://github.com/mbadolato/iTerm2-Color-Schemes/tarball/master"
# Functions
# ---------
homebrew_install()
{
echo "It seems you don't have Homebrew installed."
echo
read -p "Install Homebrew? (y/n) " -n 1 answere
echo
if [[ $answere == "y" || $answere == "Y" ]]; then
ruby -e "$($HOMEBREW)"
echo "updating Homebrew ..."
brew update
brew upgrade
else
echo "Sorry, for this automated Script we need Homebrew."
echo "closing ..."
exit 1
fi
}
ascii_font()
{
echo ' _____ __ __ ____ '
echo ' / __(_)____/ /_ _____/ /_ ___ / / / '
echo ' / /_/ / ___/ __ \ / ___/ __ \/ _ \/ / / '
echo ' / __/ (__ ) / / / (__ ) / / / __/ / / '
echo '/_/ /_/____/_/ /_/ /____/_/ /_/\___/_/_/ '
echo ' '
echo ' awesome fish shell setup '
echo ' '
echo ' '
}
# Execute the Shell Script
ascii_font
# Test if Homebrew is installed
test -x brew || homebrew_install
read -p "Install iTerms2 ? (y/n) " -n 1 answere
echo
if [[ $answere == "y" || $answere == "Y" ]]; then
brew install caskroom/cask/brew-cask
brew cask install iterm2
read -p "Download iTerm2 Colour Schemes ? (y/n) " -n 1 answere
echo
if [[ $answere == "y" || $answere == "Y" ]]; then
curl -o $COLOUR_THEMES
fi
fi
read -p "Install Fish Shell ? (y/n) " -n 1 answere
echo
if [[ $answere == "y" || $answere == "Y" ]]; then
brew install fish --HEAD
read -p "Install Fisher ? (y/n) " -n 1 answere
echo
if [[ $answere == "y" || $answere == "Y" ]]; then
curl https://git.io/fisher --create-dirs -sLo ~/.config/fish/functions/fisher.fish
echo "updating Fisher ...."
read -p "Install useful Fish Packages: z + bass ? (y/n) " -n 1 answere
echo
if [[ $answere == "y" || $answere == "Y" ]]; then
echo "Installing packages z, and bass"
fish -c "fisher add jethrokuan/z edc/bass"
fi
fi
fi
read -p "Install Powerline Fonts ? (y/n) " -n 1 answere
echo
if [[ $answere == "y" || $answere == "Y" ]]; then
brew install git fontconfig
cp /usr/local/etc/fonts/fonts.conf.bak /usr/local/etc/fonts/fonts.conf
git clone https://github.com/powerline/fonts.git
./fonts/install.sh
fi
clear
echo "Setup finished"
echo "--------------"
echo
echo "For further information i recommend reading the Fish Shell Documentation"
echo
read -p "Should i open the Fish Shell Documentation for you ? (y/n) " -n 1 answere
echo
if [[ $answere == "y" || $answere == "Y" ]]; then
open http://fishshell.com/docs/current/
fi
echo
echo "closing ..."