From 0c097e870f55437b36977f3dd276665b785af3e0 Mon Sep 17 00:00:00 2001 From: kyodev Date: Fri, 22 Dec 2017 02:40:23 +0100 Subject: [PATCH] getFirefox 3.16.0 --- scripts/getFirefox | 24 ++++++++++++------------ scripts/getFirefox_changelog.md | 5 +++++ 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/scripts/getFirefox b/scripts/getFirefox index b4eb7a9..c7f0f24 100755 --- a/scripts/getFirefox +++ b/scripts/getFirefox @@ -1,7 +1,7 @@ #!/bin/bash -version=3.15.0 -date="18/12/2017" +version=3.16.0 +date="21/12/2017" projet="simpledeb" contact="IRC freenode ##sdeb ou https://framagit.org/kyodev/kyopages/issues/" script="getFirefox" @@ -851,7 +851,7 @@ ffx_profil_user(){ # 4/12/2017 ffx_lanceur_desktop ffx_update_alternatives fi - [ "$1" == "fu_user" ] && f__info "log" "profil <$produit> configuré pour $fu_user" + [ "$1" == "user" ] && f__info "log" "profil <$produit> configuré pour $fu_user" } # calcul url téléchargement, assigne $recup_url @@ -897,14 +897,14 @@ ffx_remove(){ # 08/10/2017 } # traitement update-alternatives -ffx_update_alternatives(){ # 06/2017 - [ "$(which update-alternatives)" ] || return 0 # update-alternatives n'est pas sur cette distrib - if ffx_get_canalBas ; then - update-alternatives --quiet --install /usr/bin/firefox x-www-browser "/usr/bin/firefox-$firefoxCanalBas" 100 - f__info " - alternatives installées pour <$firefoxCanalBas>" - else # plus aucun canal installé, on efface - if update-alternatives --get-selections | grep firefox | grep -q x-www-browser; then - update-alternatives --quiet --remove-all x-www-browser +ffx_update_alternatives(){ # 21/12/2017 + if type -p "update-alternatives" &>/dev/null ; then # update-alternatives existe? + if [ "$firefoxCanalBas" ] ; then + update-alternatives --quiet --install $( type -p x-www-browser 2>/dev/null ) 'x-www-browser' /usr/bin/firefox-$firefoxCanalBas 100 # nouvelle alternative + update-alternatives --quiet --install $( type -p gnome-www-browser 2>/dev/null ) 'gnome-www-browser' /usr/bin/firefox-$firefoxCanalBas 100 # nouvelle alternative + update-alternatives --quiet --set 'x-www-browser' /usr/bin/firefox-$firefoxCanalBas # si le priorité n'est pas suffisante + update-alternatives --quiet --set 'gnome-www-browser' /usr/bin/firefox-$firefoxCanalBas # si le priorité n'est pas suffisante + f__info " - alternatives installées pour <$firefoxCanalBas>" fi fi } @@ -1122,7 +1122,7 @@ produitAll="latest beta nightly" dirInstallTB="/opt/usr/share/tor-browser" profilTor="$dirInstallTB/Browser/TorBrowser/Data/Browser/profile.default" -ls -d /opt/firefox-* &>/dev/null && problemOldInstall="detected" # ancienne localisation install firefox +ls -d /opt/firefox-* 2>/dev/null && problemOldInstall="detected" # ancienne localisation install firefox [ "$problemOldInstall" ] && f__info "raw" "$RED""Ancien(s) répertoire(s) d'installation détecté(s)" \ " Il faudrait réinstaller les version(s) détectée(s):" \ "$YELLOW""$(ls -d /opt/firefox-* | sed -E 's/.*firefox-(.*)/ getFirefox i-\1/')" \ diff --git a/scripts/getFirefox_changelog.md b/scripts/getFirefox_changelog.md index bd75763..d05e4ba 100644 --- a/scripts/getFirefox_changelog.md +++ b/scripts/getFirefox_changelog.md @@ -1,6 +1,11 @@ # changelog getFirefox +## getFirefox 3.16.0 21/12/2017 + +* révision: update alternatives +* fix: mineurs + ## getFirefox 3.15.0 18/12/2017 * fix: install manuelle, bug potentiel