From f1412739df192618c4f6b3db70c178f0952d9d19 Mon Sep 17 00:00:00 2001 From: Bruno 21 Date: Fri, 12 Feb 2021 08:32:48 +0100 Subject: [PATCH] node.sh + add number of package update --- plugins.d/node.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/plugins.d/node.sh b/plugins.d/node.sh index 850dfd8..552444b 100755 --- a/plugins.d/node.sh +++ b/plugins.d/node.sh @@ -159,6 +159,10 @@ if [ -d "$local_path" ]; then echo -e "\n${underline}🌿 Search for local packages update...${reset}\n" outdated=$(npm outdated --long | sed '1d') if [ -n "$outdated" ]; then + nb_update=$(echo "outdated" | wc -l | xargs) + a="available package update" + array=($a) + [ "$nb_update" -gt 1 ] && echo -e "${box} $nb_update ${reset} ${array[@]/%/s}:\n" || echo -e "${box} $nb_update ${reset} ${array[@]}:\n" echo -e "\n${underline}🌿 Updating local packages...${reset}\n" @@ -203,6 +207,11 @@ echo -e "\n${underline}🌿 Search for global packages update...${reset}\n" glong_outdated=$(npm outdated -g --long | sed '1d') if [ -n "$glong_outdated" ]; then + nb_update_global=$(echo "glong_outdated" | wc -l | xargs) + a="available package update" + array=($a) + [ "$nb_update_global" -gt 1 ] && echo -e "${box} $nb_update_global ${reset} ${array[@]/%/s}:\n" || echo -e "${box} $nb_update_global ${reset} ${array[@]}:\n" + echo -e "$glong_outdated\n" echo -e "\n${underline}🌿 Updating global packages...${reset}\n" @@ -210,6 +219,8 @@ if [ -n "$glong_outdated" ]; then if [[ " $glong_outdated " =~ "angular" ]]; then export NG_CLI_ANALYTICS="false" fi + # 15 packages are looking for funding + while IFS= read -r line do