option —latest
homebrew.sh & kymsu2.sh: -ajout d’une option —latest pour afficher les casks ‘latest’
This commit is contained in:
@@ -23,6 +23,8 @@ declare -a do_not_update=()
|
|||||||
|
|
||||||
# No distract mode (no user interaction)(Casks with 'latest' version number won't be updated)
|
# No distract mode (no user interaction)(Casks with 'latest' version number won't be updated)
|
||||||
no_distract=false
|
no_distract=false
|
||||||
|
|
||||||
|
latest=false
|
||||||
#
|
#
|
||||||
###############################################################################################
|
###############################################################################################
|
||||||
#
|
#
|
||||||
@@ -49,6 +51,10 @@ if [[ $1 == "--nodistract" ]]; then
|
|||||||
no_distract=true
|
no_distract=true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ $1 == "--latest" ]]; then
|
||||||
|
latest=true
|
||||||
|
fi
|
||||||
|
|
||||||
echo -e "\033[1m🍺 Homebrew \033[0m"
|
echo -e "\033[1m🍺 Homebrew \033[0m"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
@@ -411,9 +417,13 @@ else
|
|||||||
|
|
||||||
if [ "$choice" == "y" ] || [ "$choice" == "Y" ]; then
|
if [ "$choice" == "y" ] || [ "$choice" == "Y" ]; then
|
||||||
echo "$i" | awk '{print $1}' | xargs -p -n 1 brew upgrade homebrew/cask/$i
|
echo "$i" | awk '{print $1}' | xargs -p -n 1 brew upgrade homebrew/cask/$i
|
||||||
|
retCode=$?
|
||||||
|
echo "code retour: $retCode"
|
||||||
echo ""
|
echo ""
|
||||||
elif [ "$choice" == "a" ] || [ "$choice" == "A" ]; then
|
elif [ "$choice" == "a" ] || [ "$choice" == "A" ]; then
|
||||||
brew upgrade homebrew/cask/$i
|
brew upgrade homebrew/cask/$i
|
||||||
|
retCode=$?
|
||||||
|
echo "code retour: $retCode"
|
||||||
echo ""
|
echo ""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -431,7 +441,7 @@ else
|
|||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
if [ -n "$upd_casks_latest" ] && [ "$no_distract" = false ]; then
|
if [ -n "$upd_casks_latest" ] && [ "$latest" == true ]; then
|
||||||
|
|
||||||
echo -e "\033[1;41m $nb_upd_casks_latest \033[0m \033[4mCasks (latest) updates:\033[0m"
|
echo -e "\033[1;41m $nb_upd_casks_latest \033[0m \033[4mCasks (latest) updates:\033[0m"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user