From 555c362e303868755c1d34b3e4ef524ab37714f0 Mon Sep 17 00:00:00 2001 From: Bruno 21 Date: Sat, 6 Feb 2021 08:13:46 +0100 Subject: [PATCH] Minors bugfixs --- plugins.d/node.sh | 16 ++++++++++------ plugins.d/pecl.sh | 20 ++++++++++++++++++-- plugins.d/pip.sh | 4 +++- 3 files changed, 31 insertions(+), 9 deletions(-) diff --git a/plugins.d/node.sh b/plugins.d/node.sh index 1e663d3..95f41a5 100755 --- a/plugins.d/node.sh +++ b/plugins.d/node.sh @@ -22,8 +22,9 @@ display_info=true # Set doctor=true to run 'npm doctor' and 'npm cache verify' each time doctor=true -# Local install -local_path=$HOME/Sites/node_modules/ +# Local install: +# run 'npm init' in local_path to create package.json +local_path=$HOME/Sites/ ######################################### @@ -162,10 +163,8 @@ if [ -d "$local_path" ]; then echo -e "\n${underline}🌿 Updating local packages...${reset}\n" if [ "$no_distract" = false ]; then - #echo "$outdated" echo "$outdated" | awk '{print $1}' | xargs -p -n 1 npm update else - #echo "$outdated" echo "$outdated" | awk '{print $1}' | xargs -n 1 npm update fi @@ -207,6 +206,11 @@ if [ -n "$glong_outdated" ]; then echo -e "$glong_outdated\n" echo -e "\n${underline}🌿 Updating global packages...${reset}\n" + # Disable: Would you like to share anonymous usage data with the Angular Team at Google ? + if [[ " $glong_outdated " =~ "angular" ]]; then + export NG_CLI_ANALYTICS="false" + fi + while IFS= read -r line do pkg=$(echo "$line" | awk '{print $1}') @@ -214,8 +218,8 @@ if [ -n "$glong_outdated" ]; then outdated="$pkg@$vers" # TEST - version=$(echo "$line" | awk '{print $1 "@" $4}') - echo "$version" + #version=$(echo "$line" | awk '{print $1 "@" $4}') + #echo "$version" # /test if [ "$no_distract" = false ]; then diff --git a/plugins.d/pecl.sh b/plugins.d/pecl.sh index f69ce94..0d16989 100755 --- a/plugins.d/pecl.sh +++ b/plugins.d/pecl.sh @@ -15,7 +15,7 @@ # Display PHP informations display_info=true # Open PHP info in Safari -php_info=true +php_info=false # ######################################### @@ -63,6 +63,17 @@ elif [ "$v" = "8.0" ]; then php_path=$(brew --prefix)/opt/php/bin fi +pecl_list=$($php_path/pecl list) +echo -e "$pecl_list\n" + +# Installation imagick: +# https://github.com/Imagick/imagick +#git clone https://github.com/Imagick/imagick +#cd imagick +#phpize && ./configure +#make +#make install + pecl_upgrade=$($php_path/pecl list-upgrades) @@ -75,14 +86,16 @@ if [ -n "$pecl_upgrade" ]; then echo "" available=$(echo "$pecl_upgrade" | grep -v 'No upgrades available' | grep 'kB') + #echo "available: $available" if [ -n "$available" ]; then while read ligne do - echo "$ligne" + #echo "$ligne" # Channel pear.php.net a=$(echo "$ligne" | grep "pear") + #echo "a: $a" if [ -n "$a" ]; then #pecl channel-update pear.php.net $php_path/pecl channel-update pear.php.net @@ -90,6 +103,7 @@ if [ -n "$pecl_upgrade" ]; then # Channel pecl.php.net b=$(echo "$ligne" | grep "pecl") + #echo "b: $b" if [ -n "$b" ]; then #pecl channel-update pecl.php.net $php_path/pecl channel-update pecl.php.net @@ -115,6 +129,8 @@ if [ -n "$pecl_upgrade" ]; then fi fi +echo "php_info: $php_info" + # si modif des extensions, les .ini dans conf.d/ ne sont pas modifiés, juste le php.ini # php.ini a été modifié il y a moins de 5mn diff --git a/plugins.d/pip.sh b/plugins.d/pip.sh index 24e92ed..c26d483 100755 --- a/plugins.d/pip.sh +++ b/plugins.d/pip.sh @@ -33,7 +33,7 @@ user="" # Add module to the do_not_update array for prevent to update. #declare -a do_not_update=() #declare -a do_not_update=("parso" "asgiref") -declare -a do_not_update=("lunr" "idna") +declare -a do_not_update=("lunr" "idna" "smmap") # ######################################### @@ -122,8 +122,10 @@ if [ -n "$upd" ]; then x=$(echo "$z" | sed 's/.$//' | sed 's/ /,/g') # on filtre les lignes (y = asgiref|setuptools|lunr) y=$(echo "$z" | sed 's/.$//' | sed 's/ /|/g') + #echo "x: $x == y: $y" dependencies=$(echo "$x" | xargs pipdeptree -r -p | grep -E $y) + echo -e "dependencies:\n $dependencies" # if [[ $line =~ $y ]]; then while IFS= read -r line; do