From 74cb267bbf31db09b4eea89f18c33f22dd99d9a7 Mon Sep 17 00:00:00 2001 From: Bruno 21 Date: Thu, 4 Apr 2019 10:14:59 +0200 Subject: [PATCH] Bugfix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -pecl: php.ini a été modifié -npm: Cannot read property 'length' of undefined -homebrew: config apache --- _homebrew.sh | 6 ++++-- _npm.sh | 3 +++ _pecl.sh | 9 +++++++++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/_homebrew.sh b/_homebrew.sh index b7cb415..f624f59 100755 --- a/_homebrew.sh +++ b/_homebrew.sh @@ -149,8 +149,10 @@ echo "" # Test if Apache conf file has been modified by Homebrew (Apache, PHP or Python updates) -dir="/usr/local/etc/httpd" -name="httpd.conf" +v_apa=$(httpd -V | grep 'SERVER_CONFIG_FILE') +conf_apa=$(echo "$v_apa" | awk -F "\"" '{print $2}') +dir=$(dirname $conf_apa) +name=$(basename $conf_apa) test=$(find $dir -name "$name" -mmin -5 -maxdepth 1) [ ! -z $test ] && echo -e "\033[1;31m❗️ ️$name was modified in the last 5 minutes\033[0m" diff --git a/_npm.sh b/_npm.sh index 40e10b1..30237a9 100755 --- a/_npm.sh +++ b/_npm.sh @@ -64,6 +64,9 @@ echo "" echo -e "\033[4m🌿 Global installed scripts:\033[0m" npm list -g --depth=0 g_outdated=$(npm outdated -g) + +# => npm ERR! Cannot read property 'length' of undefined -> https://stackoverflow.com/questions/55172700/npm-outdated-g-error-cannot-read-property-length-of-undefined + # update -> wanted ; install -> latest if [ -n "$g_outdated" ]; then if [ "$no_distract" = false ]; then diff --git a/_pecl.sh b/_pecl.sh index 94c39b7..684b33f 100755 --- a/_pecl.sh +++ b/_pecl.sh @@ -49,6 +49,15 @@ if [ -n "$pecl_upgrade" ]; then fi fi +# php.ini a été modifié il y a moins de 5mn +v_php=$(php --info | grep -E 'usr.*ini') +conf_php=$(echo "$v_php" | grep 'Loaded Configuration File' | awk '{print $NF}') +dir=$(dirname $conf_php) +name=$(basename $conf_php) + +test=$(find $dir -name "$name" -mmin -5 -maxdepth 1) +[ ! -z $test ] && echo -e "\033[1;31m❗️ ️$name was modified in the last 5 minutes\033[0m" + echo "" echo ""