Ajout mode ’no distract’
This commit is contained in:
2018-07-26 13:58:08 +02:00
parent c03535eecf
commit e4c7dd4ac4

13
_mas.sh
View File

@@ -5,6 +5,13 @@
echo -e "\033[1m🍏 Mac App Store updates come fast as lightning \033[0m"
# No distract mode (Casks with 'latest' version number won't be updated)
no_distract=false
if [[ $1 == "--nodistract" ]]; then
no_distract=true
fi
#mas outdated
massy=`mas outdated`
echo ""
@@ -15,6 +22,8 @@ if [ -n "$massy" ]; then
echo "$massy" | cut -d " " -f2-5
echo ""
if [ "$no_distract" = false ]; then
a=$(echo -e "Do you wanna run \033[1mmas upgrade\033[0m ? (y/n)")
read -p "$a" choice
case "$choice" in
@@ -23,6 +32,10 @@ if [ -n "$massy" ]; then
* ) echo "invalid";;
esac
else
mas upgrade
fi
else
echo -e "\033[4mNo availables mas updates.\033[0m"
fi