@@ -36,9 +36,8 @@ function wait_for_xcode_cli_tools_installation() {
3636 readChoice choice
3737 if [[ $choice == ' y' || $choice == ' Y' ]]; then
3838 echo -ne " \n"
39- if [[ -z ` xcode-select -p` ]]
40- then
41- sudo xcode-select --install 2>& 1 > /dev/null
39+ if [[ -z $( xcode-select -p) ]]; then
40+ sudo xcode-select --install 2>&1 > /dev/null
4241 echo -ne " \nShould we proceed further (y/N): \b"
4342 wait_for_xcode_cli_tools_installation
4443 fi
@@ -50,7 +49,6 @@ function wait_for_xcode_cli_tools_installation() {
5049 return $?
5150}
5251
53-
5452function run_this_command() {
5553 _command=$1
5654 osascript << EOF
@@ -166,11 +164,10 @@ function main() {
166164 set_system_hostname || exit
167165
168166 # we need xcode command line tool first
169- if [[ -z ` xcode-select -p` ]]
170- then
167+ if [[ -z $( xcode-select -p) ]]; then
171168 # initially its gonna take a while to install xcode command line tools
172169 echo -ne " [+] Please allow xcode command line tools to be installed \n"
173- sudo xcode-select --install 2>& 1 > /dev/null
170+ sudo xcode-select --install 2>&1 > /dev/null
174171 echo -ne " \nShould we proceed further (y/N): \b"
175172 wait_for_xcode_cli_tools_installation || exit
176173 fi
@@ -224,20 +221,26 @@ function main() {
224221 wget -q " $meslo_bold_italic " -O ~ /Library/Fonts/MesloLGS\ NF\ Bold\ Italic.ttf
225222 run_this_command " fc-cache -vf ~/.local/share/fonts/"
226223
227- # one last step
228224 # set zsh and oh-my-zsh
229225 run_this_command " brew install zsh zsh-completions"
230226 run_this_command " [[ -e ~/.zcompdump ]] && rm -f ~/.zcompdump || compinit"
227+ run_this_command " compaudit | xargs chmod g-w,o-w"
231228 chmod go-w ' /usr/local/share'
232- sh -c " $( curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh) "
233- git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:- ~/ .oh-my-zsh/ custom} /themes/powerlevel10k
234-
235229
236230 # finally change shell to zsh
237231 command -v zsh | sudo tee -a /etc/shells
238232 sudo chsh -s $( command -v zsh)
239233 chsh -s $( command -v zsh)
240- run_this_command " compaudit | xargs chmod g-w,o-w"
234+
235+ # one last step
236+ echo -ne " [+] Installing oh-my-zsh\n"
237+ run_this_command " curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh | sh"
238+
239+ echo -ne " [+] Installing powerlevel10k\n"
240+ git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:- ~/ .oh-my-zsh/ custom} /themes/powerlevel10k
241+
242+ # open a terminal here for virtualenv to do a quick self configuration
243+ run_this_command " echo 'All Good'"
241244
242245 echo " [!] please consider donating me if you can, helps me a meal for the day."
243246 open -a Safari " https://www.paypal.me/nar3nd3rs1ngh"
0 commit comments