_mas.sh
Ajout mode ’no distract’
This commit is contained in:
27
_mas.sh
27
_mas.sh
@@ -5,6 +5,13 @@
|
|||||||
|
|
||||||
echo -e "\033[1m🍏 Mac App Store updates come fast as lightning \033[0m"
|
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
|
#mas outdated
|
||||||
massy=`mas outdated`
|
massy=`mas outdated`
|
||||||
echo ""
|
echo ""
|
||||||
@@ -15,13 +22,19 @@ if [ -n "$massy" ]; then
|
|||||||
echo "$massy" | cut -d " " -f2-5
|
echo "$massy" | cut -d " " -f2-5
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
a=$(echo -e "Do you wanna run \033[1mmas upgrade\033[0m ? (y/n)")
|
if [ "$no_distract" = false ]; then
|
||||||
read -p "$a" choice
|
|
||||||
case "$choice" in
|
a=$(echo -e "Do you wanna run \033[1mmas upgrade\033[0m ? (y/n)")
|
||||||
y|Y|o ) mas upgrade;;
|
read -p "$a" choice
|
||||||
n|N ) echo "Ok, let's continue";;
|
case "$choice" in
|
||||||
* ) echo "invalid";;
|
y|Y|o ) mas upgrade;;
|
||||||
esac
|
n|N ) echo "Ok, let's continue";;
|
||||||
|
* ) echo "invalid";;
|
||||||
|
esac
|
||||||
|
|
||||||
|
else
|
||||||
|
mas upgrade
|
||||||
|
fi
|
||||||
|
|
||||||
else
|
else
|
||||||
echo -e "\033[4mNo availables mas updates.\033[0m"
|
echo -e "\033[4mNo availables mas updates.\033[0m"
|
||||||
|
|||||||
Reference in New Issue
Block a user