-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtools.sh
135 lines (115 loc) · 3.08 KB
/
tools.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
source _utils.sh
# Install command-line tools using Homebrew.
# ------------------------------------------------------------------------------
e_pending "Installing tools"
# ------------------------------------------------------------------------------
brew tap homebrew/cask
if [[ ! -d "/Applications/DiffMerge.app" ]]; then
e_pending "Installing diffmerge"
brew install --cask diffmerge
test_app "DiffMerge"
else
brew upgrade diffmerge
fi
if [[ ! -d "/Applications/iTerm.app" ]]; then
e_pending "Installing iterm2"
brew install --cask iterm2
test_app "iTerm"
else
brew upgrade iterm2
fi
if [[ ! -d "/Applications/Sketch.app" ]]; then
e_pending "Installing sketch"
brew install --cask sketch
test_app "Sketch"
else
brew upgrade slack
fi
# ------------------------------------------------------------------------------
e_pending "Checking tools"
# ------------------------------------------------------------------------------
if test ! $(which watchman); then
if has_command "brew"; then
if ! has_command "watchman"; then
e_pending "Installing watchman"
brew install watchman
test_command "watchman"
fi
fi
else
brew upgrade watchman
fi
if test ! $(which watch); then
if has_command "brew"; then
if ! has_command "watch"; then
e_pending "Installing watch"
brew install watch
test_command "watch"
fi
fi
else
brew upgrade watch
fi
if test ! $(which wget); then
if has_command "brew"; then
if ! has_command "wget"; then
e_pending "Installing wget"
brew install wget
test_command "wget"
fi
fi
else
brew upgrade wget
fi
if test ! $(which curl); then
e_pending "Installing curl"
brew install curl
else
brew upgrade curl
fi
if test ! $(which trash); then
if has_command "brew"; then
if ! has_command "trash"; then
e_pending "Installing trash"
brew install trash
test_command "trash"
fi
fi
else
brew upgrade trash
fi
if test ! $(which zsh); then
e_pending "Installing zsh"
brew install zsh
test_command "zsh"
else
brew upgrade zsh
fi
#if has_command "zsh"; then
# if ! has_path ".oh-my-zsh"; then
# get_consent "Install oh-my-zsh"
# if has_consent; then
# e_pending "Installing oh-my-zsh"
# sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
# test_path ".oh-my-zsh"
# fi
# fi
#fi
if has_command "brew" && has_command "zsh"; then
e_pending "Installing powerlevel10k"
brew install romkatv/powerlevel10k/powerlevel10k
echo 'source /usr/local/opt/powerlevel10k/powerlevel10k.zsh-theme' >>! ~/.zshrc
test_brew "powerlevel10k"
p10k configure
e_pending "Installing zsh-autosuggestions"
brew install zsh-autosuggestions
echo "source /usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh" >> ~/.zshrc
test_brew "zsh-autosuggestions"
e_pending "Installing zsh-syntax-highlighting"
brew install zsh-syntax-highlighting
echo "source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ~/.zshrc
test_brew "zsh-syntax-highlighting"
fi
ZSH_DISABLE_COMPFIX="true"
#source $ZSH/oh-my-zsh.sh