Skip to content

Commit

Permalink
fix(auto): #24 - fix packages
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandre-delaloy committed Mar 7, 2022
1 parent 27433a9 commit 6aa7cd8
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions exec/packages/brew.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,19 @@ exec_b=(brew update)
exec_c=(brew upgrade)
exec_d=(brew cleanup)
exec_e=(brew doctor)
exec_f=(eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)")
exec_f="eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"

ui_start

if [ "$(which brew)" != 0 ]; then
ui_info "installing brew executable"
ui_cmd "$exec_a" ; $exec_a
sourcing="eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
if [ -f "$HOME"/.zshrc ]; then
ui_info "$HOME/.zshrc detected"
if ! grep -q "$sourcing" < "$HOME"/.zshrc ; then
if ! grep -q "$exec_f" < "$HOME"/.zshrc ; then
ui_info "dotfile sourcing not found"
ui_cmd "$sourcing >> $HOME/.zshrc"
printf "\n%s\n" "$sourcing" >> "$HOME"/.zshrc
ui_cmd "$exec_f >> $HOME/.zshrc"
printf "\n%s\n" "$exec_f" >> "$HOME"/.zshrc
else
ui_info "sourcing already found, terminating"
fi
Expand Down

0 comments on commit 6aa7cd8

Please sign in to comment.