mirror of https://framagit.org/kyodev/kyopages.git
getFirefox 4.3.0
This commit is contained in:
parent
475289730a
commit
0b5cade113
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
version=4.2.0
|
version=4.3.0
|
||||||
date="24/12/2017"
|
date="24/12/2017"
|
||||||
projet="simpledeb"
|
projet="simpledeb"
|
||||||
contact="IRC freenode ##sdeb ou https://framagit.org/kyodev/kyopages/issues/"
|
contact="IRC freenode ##sdeb ou https://framagit.org/kyodev/kyopages/issues/"
|
||||||
|
@ -198,16 +198,16 @@ f__user(){ # 3/12/2017
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
# test wget, $1=url à tester, sortie du script (même si url testée ok) avec affichage erreur ou ok
|
# test wget, $1=url à tester, $2=''|print|loc|test
|
||||||
|
# par défaut, sortie du script (même si url testée ok) avec affichage erreur ou ok
|
||||||
# si $2=print affiche url testée & entêtes http & location, return 0
|
# si $2=print affiche url testée & entêtes http & location, return 0
|
||||||
# si $2=loc affiche seulement location, return 0
|
# si $2=loc affiche seulement location, return 0
|
||||||
# si $2=test return 0 si ok, return 1 si KO
|
# si $2=test return 0 si ok, return 1 si KO
|
||||||
f__wget_test(){ # 23/12/2017
|
f__wget_test(){ # 24/12/2017
|
||||||
local file_test_wget="/tmp/testWget-$script" retourWget retourHttp location wget_log="/tmp/testWget_$RANDOM.log"
|
local file_test_wget="/tmp/testWget-$script" retourWget retourHttp location
|
||||||
|
|
||||||
wget -Sq --timeout=5 --tries=2 --user-agent="$user_agent" -o "$wget_log" --spider --save-headers "$1" &>"$file_test_wget"
|
wget -Sq --timeout=5 --tries=2 --user-agent="$user_agent" --spider --save-headers "$1" &>"$file_test_wget"
|
||||||
retourWget="$?"
|
retourWget="$?"
|
||||||
rm "$wget_log"
|
|
||||||
[ "$retourWget" == 1 ] && retourWget="1: code erreur générique"
|
[ "$retourWget" == 1 ] && retourWget="1: code erreur générique"
|
||||||
[ "$retourWget" == 2 ] && retourWget="2: parse erreur (ligne de commande?)"
|
[ "$retourWget" == 2 ] && retourWget="2: parse erreur (ligne de commande?)"
|
||||||
[ "$retourWget" == 3 ] && retourWget="3: erreur Entrée/sortie fichier"
|
[ "$retourWget" == 3 ] && retourWget="3: erreur Entrée/sortie fichier"
|
||||||
|
@ -220,7 +220,6 @@ f__wget_test(){ # 23/12/2017
|
||||||
location=$( grep -i 'location' $file_test_wget | xargs )
|
location=$( grep -i 'location' $file_test_wget | xargs )
|
||||||
if [ "$2" == "test" ]; then
|
if [ "$2" == "test" ]; then
|
||||||
rm -f "$file_test_wget"
|
rm -f "$file_test_wget"
|
||||||
rm -f "$wget_log"
|
|
||||||
# spécial maintenance frama.link, pas de redirection sur page status framalink
|
# spécial maintenance frama.link, pas de redirection sur page status framalink
|
||||||
grep -q '303' <<< $retourHttp && return 1 # 303 See Other
|
grep -q '303' <<< $retourHttp && return 1 # 303 See Other
|
||||||
[ "$retourWget" == "0" ] && return 0 || return 1
|
[ "$retourWget" == "0" ] && return 0 || return 1
|
||||||
|
@ -235,15 +234,13 @@ f__wget_test(){ # 23/12/2017
|
||||||
echo "$STD"
|
echo "$STD"
|
||||||
fi
|
fi
|
||||||
if [ "$2" == "print" ] || [ "$2" == "loc" ]; then
|
if [ "$2" == "print" ] || [ "$2" == "loc" ]; then
|
||||||
[ "$location" ] && echo -n "$YELLOW $location" || echo -n "$YELLOW no location"
|
[ "$location" ] && echo -n "$YELLOW$location" || echo -n "$YELLOW""no location"
|
||||||
echo "$STD"
|
echo "$STD"
|
||||||
rm -f "$file_test_wget"
|
rm -f "$file_test_wget"
|
||||||
rm -f "$wget_log"
|
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
if [ "$retourWget" != "0" ]; then
|
if [ "$retourWget" != "0" ]; then
|
||||||
rm "$file_test_wget"
|
rm -f "$file_test_wget"
|
||||||
rm -f "$wget_log"
|
|
||||||
f__error "wget, erreur $retourWget" "$1" "$YELLOW$retourHttp" "$location"
|
f__error "wget, erreur $retourWget" "$1" "$YELLOW$retourHttp" "$location"
|
||||||
echo -e "$RED erreur wget, $retourWget \n $1 \n $YELLOW$retourHttp \n $location$STD" # pour les diags
|
echo -e "$RED erreur wget, $retourWget \n $1 \n $YELLOW$retourHttp \n $location$STD" # pour les diags
|
||||||
return 1
|
return 1
|
||||||
|
@ -251,8 +248,7 @@ f__wget_test(){ # 23/12/2017
|
||||||
if grep -q '200' <<< $retourHttp; then
|
if grep -q '200' <<< $retourHttp; then
|
||||||
echo -e "$GREEN\ntout est ok, réessayer$STD\n"
|
echo -e "$GREEN\ntout est ok, réessayer$STD\n"
|
||||||
fi
|
fi
|
||||||
rm "$file_test_wget"
|
rm -f "$file_test_wget"
|
||||||
rm -f "$wget_log"
|
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -369,12 +365,11 @@ ffx_get_canalBas(){ # 18/12/2017
|
||||||
[ "$ffx_canal_bas" ] && return || return 1
|
[ "$ffx_canal_bas" ] && return || return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
# version en ligne et installée, affichage, [$1=quiet]
|
# version en ligne et installée, affichage
|
||||||
ffx_get_version(){ # 23/12/2017
|
ffx_get_version(){ # 24/12/2017
|
||||||
local recup_url ver_latest ver_esr ver_beta ver_nightly ii
|
local recup_url ver_latest ver_esr ver_beta ver_nightly ii
|
||||||
local verFFxInstall='' verFFxOnline='' pointeur appli="Firefox" fileTmp="/tmp/$script-getVersion_${appli// }"
|
local verFfxInstall='' verFfxOnline='' pointeur appli="Firefox" fileTmp="/tmp/$script-getVersion_${appli// }"
|
||||||
|
|
||||||
x_get_version=1
|
|
||||||
echo -n " ."
|
echo -n " ."
|
||||||
#recup url
|
#recup url
|
||||||
# version latest & esr
|
# version latest & esr
|
||||||
|
@ -409,25 +404,24 @@ ffx_get_version(){ # 23/12/2017
|
||||||
# versions en ligne
|
# versions en ligne
|
||||||
[ "$ii" == "dev" ] && continue
|
[ "$ii" == "dev" ] && continue
|
||||||
pointeur="ver_$ii"
|
pointeur="ver_$ii"
|
||||||
verFFxOnline+=$( printf "%-7s: %-10s" $ii ${!pointeur} )
|
verFfxOnline+=$( printf "%7s: %-7s " $ii ${!pointeur} )
|
||||||
[[ "${!pointeur}" != "$RED""n/a" ]] && (( compteur++ ))
|
[[ "${!pointeur}" != "$RED""n/a" ]] && (( compteur++ ))
|
||||||
|
|
||||||
# versions installées
|
# versions installées
|
||||||
if [ -x "$dirInstallFfx$ii/firefox" ]; then
|
if [ -x "$dirInstallFfx$ii/firefox" ]; then
|
||||||
verFFxInstall+=$( printf "%-7s: %-10s" $ii $( $dirInstallFfx$ii/firefox -v | grep -Eo '[0-9].*' ) )
|
verFfxInstall+=$( printf "%7s: %-7s " $ii $( $dirInstallFfx$ii/firefox -v | grep -Eo '[0-9].*' ) )
|
||||||
(( compteur2++ ))
|
(( compteur2++ ))
|
||||||
else
|
else
|
||||||
verFFxInstall+=$( printf " %.s" $(seq 19) )
|
verFfxInstall+=$( printf " %.s" $(seq 17) )
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
verFFxOnline="$appli en ligne: $YELLOW$verFFxOnline"
|
|
||||||
[ "$( xargs <<< $verFFxInstall )" ] || verFFxInstall="Non installé"
|
[[ $( xargs <<< $verFfxInstall ) ]] || verFfxInstall="Non installé"
|
||||||
verFFxInstall="$appli en place: $GREEN$verFFxInstall"
|
[[ $( xargs <<< $verFfxOnline ) ]] || verFfxOnline="$RED""n/a"
|
||||||
[ "$1" == "quiet" ] && return 0
|
|
||||||
|
|
||||||
echo -e "\n"
|
echo -e "\n"
|
||||||
f__info "raw" "$verFFxInstall"
|
f__info "raw" "$appli en place: $GREEN$verFfxOnline"
|
||||||
f__info "$verFFxOnline"
|
f__info "$appli en ligne: $YELLOW$verFfxInstall"
|
||||||
}
|
}
|
||||||
|
|
||||||
# ascii art godzilla
|
# ascii art godzilla
|
||||||
|
@ -563,7 +557,7 @@ ffx_lanceur_desktop(){ # 18/12/2017
|
||||||
}
|
}
|
||||||
|
|
||||||
# version personnalisation en ligne, [$1=quiet], assigne $perso_ffx_afaire
|
# version personnalisation en ligne, [$1=quiet], assigne $perso_ffx_afaire
|
||||||
ffx_pers_get_version(){ # 23/12/2017
|
ffx_pers_get_version(){ # 24/12/2017
|
||||||
local ii verEnPlace persEnPlace verPersOnline appli="Firefox"
|
local ii verEnPlace persEnPlace verPersOnline appli="Firefox"
|
||||||
|
|
||||||
x_ffx_pers_get_version=1
|
x_ffx_pers_get_version=1
|
||||||
|
@ -581,14 +575,13 @@ ffx_pers_get_version(){ # 23/12/2017
|
||||||
perso_ffx_afaire="$ii "
|
perso_ffx_afaire="$ii "
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
[ "$1" == "quiet" ] && return 0
|
[ "$1" == "quiet" ] && return 0
|
||||||
if [ "$persEnPlace" ]; then
|
|
||||||
f__info "raw" "perso. $appli en place : $GREEN$persEnPlace"
|
[[ $( xargs <<< $persEnPlace ) ]] || persEnPlace="Non installé"
|
||||||
else
|
[[ $( xargs <<< $verPersOnline ) ]] || verPersOnline="$RED""n/a"
|
||||||
f__info "raw" "perso. $appli en place :$GREEN Non installé"
|
|
||||||
fi
|
f__info "raw" "perso. $appli en place: $GREEN$persEnPlace"
|
||||||
f__info "perso. $appli en ligne : $YELLOW$verPersOnline"
|
f__info "perso. $appli en ligne: $YELLOW$verPersOnline"
|
||||||
}
|
}
|
||||||
|
|
||||||
# recup user.js et chrome/userChrome.css, $1=canal à personnaliser ou mettre à jour
|
# recup user.js et chrome/userChrome.css, $1=canal à personnaliser ou mettre à jour
|
||||||
|
@ -612,7 +605,7 @@ ffx_pers_install(){ # 23/12/2017
|
||||||
cp "$dirTemp/user.js" "$dirProfilFfx/$canal/"
|
cp "$dirTemp/user.js" "$dirProfilFfx/$canal/"
|
||||||
chown "$fu_user:" "$dirProfilFfx/$canal/user.js"
|
chown "$fu_user:" "$dirProfilFfx/$canal/user.js"
|
||||||
if [ -e "$dirTemp/userChrome.css" ]; then
|
if [ -e "$dirTemp/userChrome.css" ]; then
|
||||||
"$dirTemp/userChrome.css" "$dirProfilFfx/$canal/chrome"
|
cp "$dirTemp/userChrome.css" "$dirProfilFfx/$canal/chrome"
|
||||||
chown "$fu_user:" "$dirProfilFfx/$canal/chrome/userChrome.css"
|
chown "$fu_user:" "$dirProfilFfx/$canal/chrome/userChrome.css"
|
||||||
fi
|
fi
|
||||||
echo "$urlPersFfx" > "$dirProfilFfx/$canal/personnalisation"
|
echo "$urlPersFfx" > "$dirProfilFfx/$canal/personnalisation"
|
||||||
|
@ -936,9 +929,9 @@ url_notice="https://kyodev.frama.io/kyopages/scripts/$script/"
|
||||||
# paramètres firefox
|
# paramètres firefox
|
||||||
dirInstallFfx="/opt/usr/share/firefox-"
|
dirInstallFfx="/opt/usr/share/firefox-"
|
||||||
dirProfilFfx="/home/$fu_user/.mozilla/firefox" # emplacement profiles.ini
|
dirProfilFfx="/home/$fu_user/.mozilla/firefox" # emplacement profiles.ini
|
||||||
# url chargement fichiers personnalisation, std ou spécifique, une seule url possible, arret à la première trouvée
|
|
||||||
produit_all="esr latest beta nightly" # tous les canaux sauf dev (=beta)
|
produit_all="esr latest beta nightly" # tous les canaux sauf dev (=beta)
|
||||||
produit_all_inverse="nightly beta latest esr" # tous les canaux sauf dev (=beta)
|
produit_all_inverse="nightly beta latest esr" # tous les canaux sauf dev (=beta)
|
||||||
|
# url chargement fichiers personnalisation, std ou spécifique, une seule url possible, arrêt à la première trouvée
|
||||||
for ii in $produit_all dev; do # renommage anciens fichiers personnalisation
|
for ii in $produit_all dev; do # renommage anciens fichiers personnalisation
|
||||||
[ -e "$dirProfilFfx/$ii/personnalisation.getFirefox" ] && mv "$dirProfilFfx/$ii/personnalisation.getFirefox" "$dirProfilFfx/$ii/personnalisation" # ancien nom
|
[ -e "$dirProfilFfx/$ii/personnalisation.getFirefox" ] && mv "$dirProfilFfx/$ii/personnalisation.getFirefox" "$dirProfilFfx/$ii/personnalisation" # ancien nom
|
||||||
done
|
done
|
||||||
|
|
|
@ -1,9 +1,12 @@
|
||||||
# changelog getFirefox
|
# changelog getFirefox
|
||||||
|
|
||||||
|
|
||||||
## getFirefox 4.2.0 24/12/2017
|
## getFirefox 4.3.0 24/12/2017
|
||||||
|
|
||||||
|
* cosmétique
|
||||||
|
* fix: f__wget_test, incompatible avec redirection logs
|
||||||
* fix: typo fscript_update
|
* fix: typo fscript_update
|
||||||
|
* fix: typo ffx_pers_install
|
||||||
|
|
||||||
## getFirefox 4.1.0 23/12/2017
|
## getFirefox 4.1.0 23/12/2017
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue