5.4.0 #30

Merged
Ark74 merged 11 commits from unstable into master 2021-02-18 09:12:02 +00:00
2 changed files with 14 additions and 9 deletions
Showing only changes of commit 96a3845a84 - Show all commits

View File

@ -24,6 +24,7 @@ apt_repo="/etc/apt/sources.list.d"
LOC_REC="TBD" LOC_REC="TBD"
ENABLE_BLESSM="TBD" ENABLE_BLESSM="TBD"
CHD_LTST="$(curl -sL https://chromedriver.storage.googleapis.com/LATEST_RELEASE)" CHD_LTST="$(curl -sL https://chromedriver.storage.googleapis.com/LATEST_RELEASE)"
CHD_LTST_2D="$(echo $CHD_LTST|cut -d "." -f 1,2)"
CHDB="$(whereis chromedriver | awk '{print$2}')" CHDB="$(whereis chromedriver | awk '{print$2}')"
DOMAIN="$(ls /etc/prosody/conf.d/ | grep -v localhost | awk -F'.cfg' '{print $1}' | awk '!NF || !seen[$0]++')" DOMAIN="$(ls /etc/prosody/conf.d/ | grep -v localhost | awk -F'.cfg' '{print $1}' | awk '!NF || !seen[$0]++')"
NC_DOMAIN="TBD" NC_DOMAIN="TBD"
@ -43,7 +44,8 @@ fi
if [ -z $CHDB ]; then if [ -z $CHDB ]; then
echo "Seems no chromedriver installed" echo "Seems no chromedriver installed"
else else
CHD_AVB=$($CHDB -v | awk '{print $2}') CHD_AVB="$($CHDB -v | awk '{print $2}')"
CHD_AVB_2D="$(echo $CHD_AVB|cut -d "." -f 1,2)"
fi fi
# True if $1 is greater than $2 # True if $1 is greater than $2
@ -86,9 +88,10 @@ update_google_repo() {
GOOGL_VER_2D="$(/usr/bin/google-chrome --version|awk '{print$3}'|cut -d "." -f 1,2)" GOOGL_VER_2D="$(/usr/bin/google-chrome --version|awk '{print$3}'|cut -d "." -f 1,2)"
upgrade_cd() { upgrade_cd() {
if [ ! -z $GOOGL_VER_2D ]; then if [ ! -z $GOOGL_VER_2D ]; then
if version_gt $GOOGL_VER_2D "$($CHD_AVB|cut -d "." -f 1,2)" if version_gt "$GOOGL_VER_2D" "$CHD_VER_2D" && \
[ "$GOOGL_VER_2D" = "$CHD_LTST_2D" ]; then
then then
echo "Upgrading ..." echo "Upgrading Chromedriver to Google Chromes version"
wget https://chromedriver.storage.googleapis.com/$CHD_LTST/chromedriver_linux64.zip wget https://chromedriver.storage.googleapis.com/$CHD_LTST/chromedriver_linux64.zip
unzip chromedriver_linux64.zip unzip chromedriver_linux64.zip
sudo cp chromedriver $CHDB sudo cp chromedriver $CHDB
@ -96,7 +99,7 @@ if [ ! -z $GOOGL_VER_2D ]; then
chromedriver -v chromedriver -v
else else
echo "No need to upgrade Chromedriver" echo "No need to upgrade Chromedriver"
printf "Current version: ${Green} $CHD_AVB ${Color_Off}\n" printf "Current version: ${Green} $CHD_AVB_2D ${Color_Off}\n"
fi fi
else else
printf "${Yellow} -> No Google Chrome versión to match, leaving untouched.${Color_Off}\n" printf "${Yellow} -> No Google Chrome versión to match, leaving untouched.${Color_Off}\n"
@ -106,15 +109,15 @@ fi
check_lst_cd() { check_lst_cd() {
printf "${Purple}Checking for the latest Chromedriver${Color_Off}\n" printf "${Purple}Checking for the latest Chromedriver${Color_Off}\n"
if [ -f $CHDB ]; then if [ -f $CHDB ]; then
printf "Current installed Chromedriver: ${Yellow} $CHD_AVB ${Color_Off}\n" printf "Current installed Chromedriver: ${Yellow} $CHD_AVB_2D ${Color_Off}\n"
printf "Latest Chromedriver version available: ${Green} $CHD_LTST ${Color_Off}\n" printf "Current installed Google Chrome: ${Green} $GOOGL_VER_2D ${Color_Off}\n"
upgrade_cd upgrade_cd
else else
printf "${Yellow} -> Seems there is no Chromedriver installed${Color_Off}\n" printf "${Yellow} -> Seems there is no Chromedriver installed${Color_Off}\n"
fi fi
} }
printf "${Blue}Update & upgrade Jitsi and components - v2.3${Color_Off}\n" printf "${Blue}Update & upgrade Jitsi and components${Color_Off}\n"
if [ -f $apt_repo/jitsi-unstable.list ]; then if [ -f $apt_repo/jitsi-unstable.list ]; then
update_jitsi_repo unstable update_jitsi_repo unstable
update_google_repo update_google_repo

View File

@ -56,7 +56,8 @@ CHD_VER_LOCAL="$($CHDB --version 2>/dev/null| awk '{print$1,$2}')"
GOOGL_VER_LOCAL="$(/usr/bin/google-chrome --version 2>/dev/null)" GOOGL_VER_LOCAL="$(/usr/bin/google-chrome --version 2>/dev/null)"
CHD_VER_2D="$(echo $CHD_VER_LOCAL|awk '{print$2}'|cut -d "." -f 1,2)" CHD_VER_2D="$(echo $CHD_VER_LOCAL|awk '{print$2}'|cut -d "." -f 1,2)"
GOOGL_VER_2D="$(echo $GOOGL_VER_LOCAL|awk '{print$3}'|cut -d "." -f 1,2)" GOOGL_VER_2D="$(echo $GOOGL_VER_LOCAL|awk '{print$3}'|cut -d "." -f 1,2)"
CHD_LTST=$(curl -sL https://chromedriver.storage.googleapis.com/LATEST_RELEASE) CHD_LTST="$(curl -sL https://chromedriver.storage.googleapis.com/LATEST_RELEASE)"
CHD_LTST_2D="$(echo $CHD_LTST|cut -d "." -f 1,2)"
#T1 #T1
echo -e "\n#1 -- Check repository --\n" echo -e "\n#1 -- Check repository --\n"
@ -113,7 +114,8 @@ if [ ! -z "$CHD_VER_LOCAL" ] && [ ! -z "$GOOGL_VER_LOCAL" ]; then
if [ $CHD_VER_2D = $GOOGL_VER_2D ]; then if [ $CHD_VER_2D = $GOOGL_VER_2D ]; then
echo -e "\nChromedriver version seems according to Google Chrome: \xE2\x9C\x94" echo -e "\nChromedriver version seems according to Google Chrome: \xE2\x9C\x94"
T3=1 T3=1
elif version_gt "$GOOGL_VER_2D" "$CHD_VER_2D" ; then elif version_gt "$GOOGL_VER_2D" "$CHD_VER_2D" && \
[ "$GOOGL_VER_2D" = "$CHD_LTST_2D" ]; then
echo -e "\nAttempting Chromedriver update!" echo -e "\nAttempting Chromedriver update!"
wget -q https://chromedriver.storage.googleapis.com/$CHD_LTST/chromedriver_linux64.zip -O /tmp/chromedriver_linux64.zip wget -q https://chromedriver.storage.googleapis.com/$CHD_LTST/chromedriver_linux64.zip -O /tmp/chromedriver_linux64.zip
unzip /tmp/chromedriver_linux64.zip -d /usr/local/bin/ unzip /tmp/chromedriver_linux64.zip -d /usr/local/bin/