<commit_before>#!/bin/bash
# Auto Mac & HomeBrew upgrade script by <NAME> (https://github.com/dade80vr)
# Require MAS https://github.com/mas-cli/mas

#sourcing bash colours
source bash-colours.sh

#banner
echo -e "${IBlue}"
echo -e "******************************************"
echo -e "******** MacUpgrade  by dade80vr *********"
echo -e "**** HomeBrew e Mac OS upgrade script ****"
echo -e "*************** version  3 ***************"
echo -e "******************************************"
echo -e "${Color_Off}"

#check owner of /usr/local
own_usr=$(stat "/usr/local" | awk '{print $5}')
#if different, set new owner
if [ "$own_usr" != "$(whoami)" ]; then
	echo -e "${IRed}*** Step 0/8 *** Set $(whoami) as new owner of /usr/local folder: ${IPurple}insert your super-user pass if required.. ${Color_Off}"
	sudo chown -R $(whoami) /usr/local > /dev/null
	echo -e "${IGreen}done!${Color_Off}"
fi

#upgrading HomeBrew and Cask
echo -en "${IYellow}*** Step 1/8 *** Run HomeBrew update.. ${Color_Off}"
brew update > /dev/null
echo -e "${IGreen}done!${Color_Off}"
echo -en "${IYellow}*** Step 2/8 *** Run HomeBrew upgrade.. ${Color_Off}"
brew upgrade > /dev/null
echo -e "${IGreen}done!${Color_Off}"

#homeBrew + Cask cache cleaning
echo -en "${IYellow}*** Step 3/8 *** Clear HomeBrew cache.. ${Color_Off}"
brew cleanup --force > /dev/null
brew cask cleanup > /dev/null
rm -f -r /Library/Caches/Homebrew/* > /dev/null
echo -e "${IGreen}done!${Color_Off}"

#Atom upgrade without confirm
echo -en "${IYellow}*** Step 4/8 *** Run Atom upgrade.. ${Color_Off}"
apm upgrade -c false > /dev/null
echo -e "${IGreen}done!${Color_Off}"

#NPM upgrade
echo -en "${IYellow}*** Step 6/8 *** Run NPM update.. ${Color_Off}"
npm update -g > /dev/null
echo -e "${IGreen}done!${Color_Off}"

#upgrading MAS
echo -en "${IYellow}*** Step 7/8 *** Check Mac App Store upgrades: ${IPurple}insert your Apple ID pass if required.. ${Color_Off}"
mas upgrade > /dev/null
echo -e "${IGreen}done!${Color_Off}"

#system updates
echo -e "${IYellow}*** Step 8/8 *** Check Mac OS upgrades: ${IPurple}insert your super-user pass if required.. ${Color_Off}"
sudo softwareupdate -iva > /dev/null

#finish!
echo -e "${IWhite}********* End!${Color_Off}"<commit_msg>fix output messages<commit_after>#!/bin/bash
# Auto Mac & HomeBrew upgrade script by <NAME> (https://github.com/dade80vr)
# Require MAS https://github.com/mas-cli/mas

#sourcing bash colours
source bash-colours.sh

#banner
echo -e "${IBlue}"
echo -e "******************************************"
echo -e "******** MacUpgrade  by dade80vr *********"
echo -e "**** HomeBrew e Mac OS upgrade script ****"
echo -e "*************** version  3 ***************"
echo -e "******************************************"
echo -e "${Color_Off}"

#check owner of /usr/local
own_usr=$(stat "/usr/local" | awk '{print $5}')
#if different, set new owner
if [ "$own_usr" != "$(whoami)" ]; then
	echo -e "${IRed}*** Step 0/8 *** Set $(whoami) as new owner of /usr/local folder: ${IPurple}insert your super-user pass if required.. ${Color_Off}"
	sudo chown -R $(whoami) /usr/local > /dev/null
	echo -e "${IGreen}done!${Color_Off}"
fi

#upgrading HomeBrew and Cask
echo -en "${IYellow}*** Step 1/8 *** Run HomeBrew update.. ${Color_Off}"
brew update > /dev/null
echo -e "${IGreen}done!${Color_Off}"
echo -en "${IYellow}*** Step 2/8 *** Run HomeBrew upgrade.. ${Color_Off}"
brew upgrade > /dev/null
echo -e "${IGreen}done!${Color_Off}"

#homeBrew + Cask cache cleaning
echo -en "${IYellow}*** Step 3/8 *** Clear HomeBrew cache.. ${Color_Off}"
brew cleanup --force > /dev/null
brew cask cleanup > /dev/null
rm -f -r /Library/Caches/Homebrew/* > /dev/null
echo -e "${IGreen}done!${Color_Off}"

#Atom upgrade without confirm
echo -en "${IYellow}*** Step 4/8 *** Run Atom upgrade.. ${Color_Off}"
apm upgrade -c false > /dev/null
echo -e "${IGreen}done!${Color_Off}"

#NPM upgrade
echo -en "${IYellow}*** Step 6/8 *** Run NPM update.. ${Color_Off}"
npm update -g > /dev/null
echo -e "${IGreen}done!${Color_Off}"

#upgrading MAS
echo -en "${IYellow}*** Step 7/8 *** Check Mac App Store upgrades: ${IPurple}insert your Apple ID pass if required.. ${Color_Off}"
mas upgrade > /dev/null
echo -e "${IGreen}done!${Color_Off}"

#system updates
echo -e "${IYellow}*** Step 8/8 *** Check Mac OS upgrades: ${IPurple}insert your super-user pass if required.. ${Color_Off}"
sudo softwareupdate -iva > /dev/null

#finish!
echo -e "${IGreen}***** End! *****${Color_Off}"
{'fraction_non_alphanumeric': 0.24179037336932074, 'fraction_numerical': 0.009896536212325686, 'mean_word_length': 4.5448877805486285, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 25, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '292369', 'n_tokens_mistral': 1578, 'n_tokens_neox': 1529, 'n_words': 498}