Files
kymsu2/_pecl.sh
Bruno 21 389d0cb1d1 pecl - homebrew
pecl:
-no distract mode
-cleaning code
homebrew:
-aide pour l’erreur ‘Error: Cask 'onyx' definition is invalid: invalid 'depends_on macos' value: :snow_leopard’
2019-03-17 09:53:55 +01:00

56 lines
1.0 KiB
Bash
Executable File
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/usr/bin/env bash
# pecl plugin for KYMSU
# https://github.com/welcoMattic/kymsu
# https://pecl.php.net
# No distract mode
no_distract=false
echo -e "\033[1m🐘 pecl \033[0m"
echo ""
echo -e "\033[1m❗ plugin en test (beta) \033[0m"
echo ""
pecl_upgrade=$(pecl list-upgrades)
if [ -n "$pecl_upgrade" ]; then
echo -e "\033[4mExtensions update:\033[0m"
echo ""
echo "$pecl_upgrade"
echo ""
available=$(echo "$pecl_upgrade" | grep -v 'No upgrades available' | grep 'kB')
while read ligne
do
#echo "$ligne"
a=$(echo "$ligne" | grep "pear")
if [ -n "$a" ]; then
pecl channel-update pear.php.net
else
#(pecl or doc) update available
b=$(echo "$ligne" | awk '{print $2}')
pecl info "$b"
echo ""
if [ "$no_distract" = false ]; then
echo "$b" | xargs -p -n 1 pecl upgrade
else
echo "$b" | xargs -n 1 pecl upgrade
fi
fi
done <<< "$available"
fi
echo ""
echo ""
# WARNING: channel "pear.php.net" has updated its protocols,
# use "pecl channel-update pear.php.net" to update