-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
install_cosmic_terminal.sh
executable file
·77 lines (63 loc) · 2.28 KB
/
install_cosmic_terminal.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
#!/bin/sh
# $? is the result (exit code) of the last executed command.
# which -s No output, just return 0 if any of the executables are found, or 1 if none are found.
# /dev/null The null device is typically used for disposing of unwanted output streams of a process
# need to handle netowrk failures for curl requests
install() {
which -s $1
if [[ $? != 0 ]]
then
echo 'installing '$1
true
else
echo $1' already installed'
false
fi
}
xcode-select -p 1> /dev/null
if [[ $? != 0 ]]
then
echo 'installing xcode...'
xcode-select --install
read -p "Press enter after you have installed xcode"
else
echo 'xcode already installed'
fi
install "brew" && /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
#echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> $HOME/.zprofile
#eval "$(/opt/homebrew/bin/brew shellenv)"
mdfind "kMDItemCFBundleIdentifier == com.googlecode.iterm2" > /dev/null
if [[ $? != 0 ]]
then
brew install --cask iterm2
else
echo 'iterm2 already installed'
fi
echo 'downloading material-design-colors...'
curl -s https://raw.githubusercontent.com/MartinSeeler/iterm2-material-design/master/material-design-colors.itermcolors > $HOME/Downloads/material-design-colors.itermcolors
# comes with mac now??
# install "zsh" && brew install zsh
if [ ! -d $HOME/.oh-my-zsh ]
then
echo 'installing oh-my-zsh ...'
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
else
echo 'oh-my-zsh already installed'
fi
if [ ! -d $HOME/.oh-my-zsh/custom/themes/powerlevel10k ]
then
echo 'installing powerlevel10k...'
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/.oh-my-zsh/custom/themes/powerlevel10k
else
echo 'powerlevel10k already installed'
fi
if [ ! -d $HOME/.oh-my-zsh/custom/plugins/zsh-autosuggestions ]
then
echo 'installing zsh-autosuggestions...'
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions
else
echo 'zsh-autosuggestions already installed'
fi
cd ~/Library/Fonts && curl -fLo "Droid Sans Mono for Powerline Nerd Font Complete.otf" https://github.com/ryanoasis/nerd-fonts/raw/master/patched-fonts/DroidSansMono/complete/Droid%20Sans%20Mono%20Nerd%20Font%20Complete.otf
install "fig" && brew install fig
fig