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