Minors bugfixs

This commit is contained in:
2021-02-06 08:13:46 +01:00
parent 32b861a8f1
commit 555c362e30
3 changed files with 31 additions and 9 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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