Commit 0dd9cda9 authored by kyodev's avatar kyodev

maj

parent cf935feb
Pipeline #57437 passed with stages
in 19 seconds
......@@ -11,7 +11,7 @@
> Ceux qui ne croient pas en l'avenir marketé _fabuleux_ de Quantum (publicité intégrée à venir, webextension limitées chez Mozilla, etc), qui présage plutôt un suivi sans saveur de Google Chrome, en attendant son abandon après une longue agonie déjà amorcée depuis longtemps, peuvent [tester Waterfox](https://framaclic.org/h/doc-getxfox)
> Waterfox est un fork basé sur l'ancien moteur avec tout les extensions fonctionnelles et une bien plus grande liberté de personnalisation
![version: 4.24.1](https://img.shields.io/badge/version-4.24.1-blue.svg?longCache=true&style=for-the-badge)
![version: 4.24.2](https://img.shields.io/badge/version-4.24.2-blue.svg?longCache=true&style=for-the-badge)
![bash langage](https://img.shields.io/badge/bash-4-brightgreen.svg?longCache=true&style=for-the-badge)
![license LPRAB / WTFPL](https://img.shields.io/badge/license-LPRAB%20%2F%20WTFPL-blue.svg?longCache=true&style=for-the-badge)
......
# getFlashPlayer
![version: 4.14.O](https://img.shields.io/badge/version-4.14.O-blue.svg?longCache=true&style=for-the-badge)
![version: 4.14.1](https://img.shields.io/badge/version-4.14.1-blue.svg?longCache=true&style=for-the-badge)
![bash langage](https://img.shields.io/badge/bash-4-brightgreen.svg?longCache=true&style=for-the-badge)
![license LPRAB / WTFPL](https://img.shields.io/badge/license-LPRAB%20%2F%20WTFPL-blue.svg?longCache=true&style=for-the-badge)
......
# getThunderbird
![version: 2.10.0](https://img.shields.io/badge/version-2.10.0-blue.svg?longCache=true&style=for-the-badge)
![version: 2.10.1](https://img.shields.io/badge/version-2.10.1-blue.svg?longCache=true&style=for-the-badge)
![bash langage](https://img.shields.io/badge/bash-4-brightgreen.svg?longCache=true&style=for-the-badge)
![license LPRAB / WTFPL](https://img.shields.io/badge/license-LPRAB%20%2F%20WTFPL-blue.svg?longCache=true&style=for-the-badge)
......
# getXfox
![version: 4.17.0](https://img.shields.io/badge/version-4.17.0-blue.svg?longCache=true&style=for-the-badge)
![version: 4.17.1](https://img.shields.io/badge/version-4.17.1-blue.svg?longCache=true&style=for-the-badge)
![bash langage](https://img.shields.io/badge/bash-4-brightgreen.svg?longCache=true&style=for-the-badge)
![license LPRAB / WTFPL](https://img.shields.io/badge/license-LPRAB%20%2F%20WTFPL-blue.svg?longCache=true&style=for-the-badge)
......
#!/bin/bash
version=4.24.1
date="12/06/2018"
version=4.24.2
date="13/06/2018"
script="getFirefox"
#contact="IRC ##sdeb@freenode.net ou https://framagit.org/sdeb/getFirefox/issues"
......@@ -31,15 +31,20 @@ f__architecture(){ # 09/O6/2018 SPÉCIFIQUE
}
# test validité archive, $1 archive, assigne $archive_detect (gzip|xz|deb|zip), return 1 si inconnue
f__archive_test(){ # O9/03/2018
local filetest
f__archive_test(){ # 13/06/2018
local filetest test
filetest=$( file -b "$1" )
grep -q 'gzip compressed data' <<< "$filetest" && archive_detect="gzip"
grep -q 'bzip2 compressed data' <<< "$filetest" && archive_detect="bzip2"
grep -q 'Debian binary package' <<< "$filetest" && archive_detect="deb"
grep -q 'Zip archive data' <<< "$filetest" && archive_detect="zip"
grep -q 'XZ compressed data' <<< "$filetest" && archive_detect="xz"
test=${filetest/*gzip compressed data*/1234567890}
[ "$test" == "1234567890" ] && archive_detect="gzip"
test=${filetest/*bzip2 compressed data*/1234567890}
[ "$test" == "1234567890" ] && archive_detect="bzip2"
test=${filetest/*binary compressed data*/1234567890}
[ "$test" == "1234567890" ] && archive_detect="deb"
test=${filetest/*Zip compressed data*/1234567890}
[ "$test" == "1234567890" ] && archive_detect="Zip"
test=${filetest/*XZ compressed data*/1234567890}
[ "$test" == "1234567890" ] && archive_detect="XZ"
if [[ -z "$archive_detect" || "$archive_detect" == "empty" ]]; then return 1; fi
}
......@@ -112,6 +117,21 @@ f__log(){ # 05/03/2018
fi
}
# $1 file, [$2=n|l] (si vide, last line)
f__read_file(){ # 13/06/2018
local i=1 no
case $2 in
l | last ) no=0 ;;
* ) no=$(( $2 )) ;;
esac
while read -r; do
(( i >= no )) && break
(( i++ ))
done < "$1"
echo "$REPLY"
}
# recherche commandes/paquets, $1 liste: cmd1|cmd2[>paquet] (séparées par espaces) ex: "gawk|mawk>gawk wget"
# si manque, return 1 & affiche commandes manquantes (si debian, ajout proposition paquet à installer)
f__requis(){ # 11/06/2018
......@@ -688,7 +708,7 @@ ffx_lanceur_desktop(){ # 09/03/2018
}
# version personnalisation en ligne, [$1=quiet], assigne $perso_ffx_afaire
ffx_pers_get_version(){ # 09/06/2018
ffx_pers_get_version(){ # 13/06/2018
local ii verPersEnPlace persEnPlace verPersOnline
x_ffx_pers_get_version=1
......@@ -703,7 +723,7 @@ ffx_pers_get_version(){ # 09/06/2018
for ii in $produit_all; do
if [ -e "$dirProfilFfx/$ii/personnalisation" ]; then
verPersEnPlace=$( sed -n '2p' "$dirProfilFfx/$ii/personnalisation" )
verPersEnPlace=$( f__read_file "$dirProfilFfx/$ii/personnalisation" 2 )
persEnPlace+="$ii: $verPersEnPlace "
if [ -z "$verPersOnline" ]; then
verPersOnline="${RED}non accessible$STD" # si quiet
......@@ -726,7 +746,7 @@ ffx_pers_get_version(){ # 09/06/2018
}
# recup user.js et chrome/userChrome.css, $1=canal à personnaliser ou mettre à jour
ffx_pers_install(){ # 09/03/2018
ffx_pers_install(){ # 13/03/2018
local verPersDL canal="$1" dirTemp="/tmp/$script-persInstall_ffx"
if [ ! -d "$dirProfilFfx/$canal" ]; then
......@@ -738,7 +758,6 @@ ffx_pers_install(){ # 09/03/2018
if ! wget -q --tries=2 --timeout=15 -o /dev/null -O "$dirTemp/user.js" "$urlPersFfx/$userFfx" ; then
if__wget_test "$urlPersFfx/$userFfx"
fi
verPersDL=$( sed -En 's/\/\*v(.*)\*\//\1/p' $dirTemp/user.js ) # version uniquement sur user.js
if ! wget -q --tries=1 --timeout=15 -o /dev/null -O "$dirTemp/userChrome.css" "$urlPersFfx/$chromeFfx" ; then
f__wget_test "$urlPersFfx/$chromeFfx"
fi
......@@ -1148,7 +1167,8 @@ for i in "${!options[@]}"; do # deuxième passe options, actions
-v | --version ) # version du script, en ligne et en place
fscript_get_version ;;
-h | --help | * ) # affichage help
f_help ;;
f_help
exit ;;
esac
done
......
#!/bin/bash
version=4.14.O
date="12/06/2018"
version=4.14.1
date="13/06/2018"
script="getFlashPlayer"
# contact="IRC ##sdeb@freenode.net ou https://framagit.org/sdeb/getFlashPlayer/issues"
......@@ -31,15 +31,20 @@ f__architecture(){ # 11/06/2018 SPECIFIQUE
}
# test validité archive, $1 archive, assigne $archive_detect (gzip|xz|deb|zip), return 1 si inconnue
f__archive_test(){ # O9/03/2018
local filetest
f__archive_test(){ # 13/06/2018
local filetest test
filetest=$( file -b "$1" )
grep -q 'gzip compressed data' <<< "$filetest" && archive_detect="gzip"
grep -q 'bzip2 compressed data' <<< "$filetest" && archive_detect="bzip2"
grep -q 'Debian binary package' <<< "$filetest" && archive_detect="deb"
grep -q 'Zip archive data' <<< "$filetest" && archive_detect="zip"
grep -q 'XZ compressed data' <<< "$filetest" && archive_detect="xz"
test=${filetest/*gzip compressed data*/1234567890}
[ "$test" == "1234567890" ] && archive_detect="gzip"
test=${filetest/*bzip2 compressed data*/1234567890}
[ "$test" == "1234567890" ] && archive_detect="bzip2"
test=${filetest/*binary compressed data*/1234567890}
[ "$test" == "1234567890" ] && archive_detect="deb"
test=${filetest/*Zip compressed data*/1234567890}
[ "$test" == "1234567890" ] && archive_detect="Zip"
test=${filetest/*XZ compressed data*/1234567890}
[ "$test" == "1234567890" ] && archive_detect="XZ"
if [[ -z "$archive_detect" || "$archive_detect" == "empty" ]]; then return 1; fi
}
......@@ -318,7 +323,7 @@ f_help(){ # 11/06/2018
end
}
fflash_avertissement(){ # 11/06/2018
fflash_avertissement(){ # 13/06/2018
cat <<- end
FlashPlayer n'est pas libre, c'est un programme propriétaire dont on ne peut pas connaître
......@@ -332,23 +337,33 @@ fflash_avertissement(){ # 11/06/2018
}
# version Flash en ligne & installée, si $1="quiet" pas d'affichage, assigne $ver_flash, $plugin_a_jour=ko
fflash_get_version(){ # 24/01/2018
fflash_get_version(){ # 13/06/2018
local verInstall
x_get_version=1
# détection version en ligne
ver_flash=$( wget -q --tries=2 --timeout=15 --user-agent="$user_agent" -o /dev/null -O - "$url_online" | \
sed -nr 's/^.*AUTO_ID.*Version[[:blank:]]+([0-9].*[0-9]).*$/\1/p' )
ver_flash=$( wget -q --tries=2 --timeout=15 --user-agent="$user_agent" -o /dev/null -O - "$url_online" )
if [[ "$ver_flash" =~ \<strong\>Version\ ([0-9.]+)\</strong\> ]]; then
ver_flash=${BASH_REMATCH[1]}
fi
# détection version installée
if [ -e "$dir_install/libflashplayer.so" ]; then
verInstall=$( strings "$dir_install"/libflashplayer.so | grep -Eo '[0-9]+_[0-9]+_[0-9]+_[0-9]+' | sed 's/_/./g' )
[[ "$ver_flash" && "$verInstall" == "$ver_flash" ]] || plugin_a_jour="ko"
else
verInstall="Non Installé"
verInstall=$( strings "$dir_install"/libflashplayer.so )
while read -r; do
if [[ "$REPLY" =~ ([0-9]+_[0-9]+_[0-9]+_[0-9]+) ]]; then
verInstall=${BASH_REMATCH[1]//_/.}
break
fi
done <<< "$verInstall"
if [[ "$ver_flash" && "$verInstall" && "$verInstall" != "$ver_flash" ]]; then
plugin_a_jour="ko"
fi
fi
[ "$ver_flash" ] || ver_flash="${RED}n/a"
[ "$1" == "quiet" ] && return 0
verInstall=${verInstall:="Non installé"}
ver_flash=${ver_flash:="${RED}n/a$STD"}
f__info "raw" "FlashPlayer en place: $GREEN$verInstall$STD"
f__info "FlashPlayer en ligne: $YELLOW$ver_flash$STD"
}
......@@ -714,7 +729,8 @@ for i in "${!options[@]}"; do # deuxième passe options, actions
fscript_get_version ;;
-h | --help | * ) # affichage help
f_help
fflash_avertissement ;;
fflash_avertissement
exit ;;
esac
done
......
#!/bin/bash
version=2.10.0
date="12/06/2018"
version=2.10.1
date="13/06/2018"
script="getThunderbird"
# contact="IRC ##sdeb@freenode.net ou https://framagit.org/sdeb/getThunderbird/issues"
......@@ -31,15 +31,20 @@ f__architecture(){ # 09/06/2018 SPÉCIFIQUE
}
# test validité archive, $1 archive, assigne $archive_detect (gzip|xz|deb|zip), return 1 si inconnue
f__archive_test(){ # O9/03/2018
local filetest
f__archive_test(){ # 13/06/2018
local filetest test
filetest=$( file -b "$1" )
grep -q 'gzip compressed data' <<< "$filetest" && archive_detect="gzip"
grep -q 'bzip2 compressed data' <<< "$filetest" && archive_detect="bzip2"
grep -q 'Debian binary package' <<< "$filetest" && archive_detect="deb"
grep -q 'Zip archive data' <<< "$filetest" && archive_detect="zip"
grep -q 'XZ compressed data' <<< "$filetest" && archive_detect="xz"
test=${filetest/*gzip compressed data*/1234567890}
[ "$test" == "1234567890" ] && archive_detect="gzip"
test=${filetest/*bzip2 compressed data*/1234567890}
[ "$test" == "1234567890" ] && archive_detect="bzip2"
test=${filetest/*binary compressed data*/1234567890}
[ "$test" == "1234567890" ] && archive_detect="deb"
test=${filetest/*Zip compressed data*/1234567890}
[ "$test" == "1234567890" ] && archive_detect="Zip"
test=${filetest/*XZ compressed data*/1234567890}
[ "$test" == "1234567890" ] && archive_detect="XZ"
if [[ -z "$archive_detect" || "$archive_detect" == "empty" ]]; then return 1; fi
}
......@@ -112,6 +117,21 @@ f__log(){ # 05/03/2018
fi
}
# $1 file, [$2=n|l] (si vide, last line)
f__read_file(){ # 13/06/2018
local i=1 no
case $2 in
l | last ) no=0 ;;
* ) no=$(( $2 )) ;;
esac
while read -r; do
(( i >= no )) && break
(( i++ ))
done < "$1"
echo "$REPLY"
}
# recherche commandes/paquets, $1 liste: cmd1|cmd2[>paquet] (séparées par espaces) ex: "gawk|mawk>gawk wget"
# si manque, return 1 & affiche commandes manquantes (si debian, ajout proposition paquet à installer)
f__requis(){ # 11/06/2018
......@@ -448,7 +468,7 @@ f_tb_get_canalBas(){ # 25/12/2017
}
# version en ligne et installée, [$1=quiet], affichage & assigne $version_tb_latest $version_tb_beta
f_tb_get_versions(){ # 10/06/2018
f_tb_get_versions(){ # 13/06/2018
local canal recup_url prefixe verOnline verTbOnline verInstall verTbInstall
x_tb_get_version=1
......@@ -456,7 +476,10 @@ f_tb_get_versions(){ # 10/06/2018
# version online
[ "$canal" == "beta" ] && prefixe="$canal-"
recup_url="https://download.mozilla.org/?product=thunderbird-$prefixe""latest&os=$fu_archi&lang=fr"
verOnline=$( sed -E 's#.*thunderbird/releases/(.*)/linux-.*$#\1#' <<< "$( f__wget_test "$recup_url" loc )" )
verOnline=$( f__wget_test "$recup_url" loc )
if [[ "$verOnline" =~ thunderbird/releases/(.*)/linux- ]]; then
verOnline=${BASH_REMATCH[1]}
fi
verTbOnline+=$( printf "%-7s: %-12s" "$canal" "$verOnline" )
case "$canal" in
latest ) version_tb_latest="$verOnline" ;;
......@@ -928,7 +951,8 @@ for i in "${!options[@]}"; do # deuxième passe options, actions
-v | --version ) # version du script, en ligne et exécuté
fscript_get_version ;;
-h | --help | * ) # affichage help
f_help ;;
f_help
exit ;;
esac
done
......
#!/bin/bash
version=4.17.0
date="12/06/2018"
version=4.17.1
date="13/06/2018"
script="getXfox"
#contact="IRC ##sdeb@freenode.net ou https://framagit.org/sdeb/getXfox/issues"
......@@ -31,15 +31,20 @@ f__architecture(){ # 09/06/2018 SPÉCIFIQUE
}
# test validité archive, $1 archive, assigne $archive_detect (gzip|xz|deb|zip), return 1 si inconnue
f__archive_test(){ # O9/03/2018
local filetest
f__archive_test(){ # 13/06/2018
local filetest test
filetest=$( file -b "$1" )
grep -q 'gzip compressed data' <<< "$filetest" && archive_detect="gzip"
grep -q 'bzip2 compressed data' <<< "$filetest" && archive_detect="bzip2"
grep -q 'Debian binary package' <<< "$filetest" && archive_detect="deb"
grep -q 'Zip archive data' <<< "$filetest" && archive_detect="zip"
grep -q 'XZ compressed data' <<< "$filetest" && archive_detect="xz"
test=${filetest/*gzip compressed data*/1234567890}
[ "$test" == "1234567890" ] && archive_detect="gzip"
test=${filetest/*bzip2 compressed data*/1234567890}
[ "$test" == "1234567890" ] && archive_detect="bzip2"
test=${filetest/*binary compressed data*/1234567890}
[ "$test" == "1234567890" ] && archive_detect="deb"
test=${filetest/*Zip compressed data*/1234567890}
[ "$test" == "1234567890" ] && archive_detect="Zip"
test=${filetest/*XZ compressed data*/1234567890}
[ "$test" == "1234567890" ] && archive_detect="XZ"
if [[ -z "$archive_detect" || "$archive_detect" == "empty" ]]; then return 1; fi
}
......@@ -112,6 +117,21 @@ f__log(){ # 05/03/2018
fi
}
# $1 file, [$2=n|l] (si vide, last line)
f__read_file(){ # 13/06/2018
local i=1 no
case $2 in
l | last ) no=0 ;;
* ) no=$(( $2 )) ;;
esac
while read -r; do
(( i >= no )) && break
(( i++ ))
done < "$1"
echo "$REPLY"
}
# recherche commandes/paquets, $1 liste: cmd1|cmd2[>paquet] (séparées par espaces) ex: "gawk|mawk>gawk wget"
# si manque, return 1 & affiche commandes manquantes (si debian, ajout proposition paquet à installer)
f__requis(){ # 11/06/2018
......@@ -276,6 +296,7 @@ f__wget_test(){ # 07/06/2018
exit 0
}
# shellcheck disable=SC1117
f_affichage(){ # 12/06/2018
clear 2>/dev/null || tput clear 2>/dev/null
......@@ -330,7 +351,7 @@ f_help(){ # 12/06/2018
}
# assigne $ver_tor_online, $ver_tor_install, [$1=quiet]
f_tor_get_version(){ # 12/06/2018
f_tor_get_version(){ # 13/06/2018
local recup_url="https://www.torproject.org/projects/torbrowser.html.en" appli="Tor Browser"
x_tor_get_version=1
......@@ -339,7 +360,7 @@ f_tor_get_version(){ # 12/06/2018
# ver_tor_online=${verOnline%%_fr\.tar\.*} # alternatif
# ver_tor_online=${ver_tor_online##*torbrowser\/}
# ver_tor_online=${ver_tor_online##*linux32-}
if [[ "$ver_tor_online" =~ torbrowser\/([0-9.]*)\/.*_fr\.tar\. ]]; then
if [[ "$ver_tor_online" =~ torbrowser/([0-9.]*)/.*_fr\.tar\. ]]; then
ver_tor_online=${BASH_REMATCH[1]}
fi
else
......@@ -476,7 +497,7 @@ f_tor_lanceur_desktop(){ # 09/03/2018
}
# version personnalisation en ligne, [$1=quiet], assigne $perso_tor_afaire
f_tor_pers_get_version(){ # 09/06/2018
f_tor_pers_get_version(){ # 13/06/2018
local verPersEnPlace verPersOnline appli="Tor Browser"
x_tor_pers_get_version=1
......@@ -489,7 +510,7 @@ f_tor_pers_get_version(){ # 09/06/2018
f__wget_test "$urlPersTor/$userTor" # si erreur, test url
fi
if [ -e "$profilTor/personnalisation" ]; then
verPersEnPlace=$( sed -n '2p' "$profilTor/personnalisation" )
verPersEnPlace=$( f__read_file "$profilTor/personnalisation" 2 )
if [ "$verPersEnPlace" != "$verPersOnline" ]; then
perso_tor_afaire="true"
fi
......@@ -506,7 +527,7 @@ f_tor_pers_get_version(){ # 09/06/2018
}
# recup userTor.js et chrome/userChrome.css
f_tor_pers_install(){ # 09/06/2018
f_tor_pers_install(){ # 13/06/2018
local verPersTorDL dirTemp="/tmp/$script-persInstall_tor" appli="Tor Browser"
if [ ! -d "$dirProfilTor/" ]; then #
......@@ -518,7 +539,10 @@ f_tor_pers_install(){ # 09/06/2018
if ! wget -q --tries=2 --timeout=15 -o /dev/null -O "$dirTemp/user.js" "$urlPersTor/$userTor"; then
f__wget_test "$urlPersTor/$userTor"
fi
verPersTorDL=$( sed -En 's/\/\*v(.*)\*\//\1/p' $dirTemp/user.js ) # version uniquement sur user.js
verPersTorDL=$( f__read_file "$dirTemp/user.js" 1 )
if [[ "$verPersTorDL" =~ /\*v(.*)\*/ ]]; then
verPersTorDL=${BASH_REMATCH[1]}
fi
if ! wget -q --tries=1 --timeout=15 -o /dev/null -O "$dirTemp/userChrome.css" "$urlPersTor/$chromeTor"; then
f__wget_test "$urlPersTor/$chromeTor"
fi
......@@ -616,7 +640,7 @@ f_w_config_system(){ # 15/01/2018
}
# traitement utilisateur, [$1='menu'] si appel indépendant pour reconfiguration
f_wfx_config_profil(){ # 27/12/2017
f_wfx_config_profil(){ # 13/06/2018
local nbProfiles appli="Waterfox"
if [ ! -d "$dirInstallWfx" ] && [ "$1" == "menu" ]; then
......@@ -630,7 +654,7 @@ f_wfx_config_profil(){ # 27/12/2017
chmod g-rx,o-rx "$profilWfx/" # droits répertoire
fi
if [ ! -e "$dirProfilWfx/profiles.ini" ]; then # pas de profile.ini
echo -e "[General]\nStartWithLastProfile=1" > "$dirProfilWfx/profiles.ini"
echo -e "[General]\\nStartWithLastProfile=1" > "$dirProfilWfx/profiles.ini"
chown "$fu_user:" "$dirProfilWfx/profiles.ini" # propriété du fichier profile.ini à l'user
chmod u+rw,go+r "$dirProfilWfx/profiles.ini" # permissions du fichier profile.ini à l'user
fi
......@@ -653,7 +677,7 @@ f_wfx_config_profil(){ # 27/12/2017
}
# [$1=quiet], assigne $ver_wfx_online $ver_wfx_install $recup_url_wfx
f_wfx_get_version(){ # 12/06/2018
f_wfx_get_version(){ # 13/06/2018
local versOnline appli="Waterfox" recup_url
x_wfx_get_version=1
......@@ -662,7 +686,7 @@ f_wfx_get_version(){ # 12/06/2018
if versOnline=$( wget -q --tries=2 --timeout=15 --user-agent="$user_agent" -o /dev/null -O - "$recup_url" ); then
# ver_wfx_online=${versOnline%%\.en-US\.linux-x86_64\.tar\.*} # alternatif
# ver_wfx_online=${ver_wfx_online##*waterfox-}
if [[ "$versOnline" =~ linux64\/.*waterfox-([0-9.]*)\..*\.tar\. ]]; then
if [[ "$versOnline" =~ linux64/.*waterfox-([0-9.]*)\..*\.tar\. ]]; then
ver_wfx_online=${BASH_REMATCH[1]}
fi
if [ -z "$ver_wfx_online" ]; then
......@@ -673,7 +697,7 @@ f_wfx_get_version(){ # 12/06/2018
f__wget_test "$recup_url"
fi
while read -r ; do
if [[ "$REPLY" =~ Linux\ 64-bit\<\/a\> ]]; then
if [[ "$REPLY" =~ Linux\ 64-bit\</a\> ]]; then
if [[ "$REPLY" =~ a\ href=\"(https.*waterfox.*\.linux-x86_64\.tar\.bz2)\" ]]; then
recup_url_wfx=${BASH_REMATCH[1]} # lien chargement
# https://storage-waterfox.netdna-ssl.com/releases/linux64/installer/waterfox-56.2.0.en-US.linux-x86_64.tar.bz2
......@@ -695,7 +719,7 @@ f_wfx_get_version(){ # 12/06/2018
}
# installation, [$1='manuel', $2 archive]
f_wfx_install(){ # 12/06/2018
f_wfx_install(){ # 13/06/2018
local fileDesktop="/usr/share/applications/waterfox.desktop" archi versArchive fileTemp
local dirTemp="/tmp/$script-install_wfx" appli="Waterfox"
......@@ -760,6 +784,7 @@ f_wfx_install(){ # 12/06/2018
echo "#!/bin/sh" > "/usr/bin/waterfox"
{
echo
# shellcheck disable=SC1117
echo "if grep -qE '\-P|\-\-ProfileManager' <<< \"\$@\" ; then "
echo " exec $dirInstallWfx/waterfox -P"
echo " else"
......@@ -825,7 +850,7 @@ f_wfx_lanceur_desktop(){ # 09/03/2018
}
# version personnalisation en ligne, [$1=quiet], assigne $perso_wfx_afaire
f_wfx_pers_get_version(){ # 09/06/2018
f_wfx_pers_get_version(){ # 13/06/2018
local verPersEnPlace verPersOnline appli="Waterfox"
x_wfx_pers_get_version=1
......@@ -838,7 +863,7 @@ f_wfx_pers_get_version(){ # 09/06/2018
f__wget_test "$urlPersWfx/$userWfx" # si erreur, test url
fi
if [ -e "$profilWfx/personnalisation" ]; then
verPersEnPlace=$( sed -n '2p' "$profilWfx/personnalisation" )
verPersEnPlace=$( f__read_file "$profilWfx/personnalisation" 2 )
if [ "$verPersEnPlace" != "$verPersOnline" ]; then
perso_wfx_afaire="true"
fi
......@@ -855,7 +880,7 @@ f_wfx_pers_get_version(){ # 09/06/2018
}
# recup user.js et chrome/userChrome.css, à personnaliser ou mettre à jour
f_wfx_pers_install(){ # 24/02/2018
f_wfx_pers_install(){ # 13/06/2018
local verPersDL dirTemp="/tmp/$script-persInstall_wfx" appli="Waterfox"
if [ ! -d "$profilWfx" ]; then
......@@ -867,7 +892,10 @@ f_wfx_pers_install(){ # 24/02/2018
if ! wget -q --tries=2 --timeout=15 -o /dev/null -O "$dirTemp/user.js" "$urlPersWfx/$userWfx"; then
f__wget_test "$urlPersWfx/$userWfx"
fi
verPersDL=$( sed -En 's/\/\*v(.*)\*\//\1/p' $dirTemp/user.js ) # version uniquement sur user.js
verPersDL=$( f__read_file "$dirTemp/user.js" 1 )
if [[ "$verPersDL" =~ /\*v(.*)\*/ ]]; then
verPersDL=${BASH_REMATCH[1]}
fi
if ! wget -q --tries=1 --timeout=15 -o /dev/null -O "$dirTemp/userChrome.css" "$urlPersWfx/$chromeWfxr"; then
f__wget_test "$urlPersWfx/$chromeWfxr"
fi
......@@ -1106,7 +1134,7 @@ prg_init(){ # 04/03/2018
f__user
retourFUser="$?"
[ "$retourFUser" -eq 1 ] && f__error "user indéterminé" \
"pour contourner, lancer le script avec:\n$GREEN USER_INSTALL=<user> $0 \n"
"pour contourner, lancer le script avec:\\n$GREEN USER_INSTALL=<user> $0 \\n"
if [ "$retourFUser" -eq 2 ]; then
if [ "$EUID" -eq 0 ]; then
fu_user="root"
......@@ -1216,7 +1244,8 @@ for i in "${!options[@]}"; do # deuxième passe options, actions
f_tor_get_version
f_tor_pers_get_version
f_wfx_get_version
f_wfx_pers_get_version ;;
f_wfx_pers_get_version
;;
ri ) # réparation icônes
f_tor_lanceur_desktop
f_wfx_lanceur_desktop ;;
......@@ -1278,7 +1307,8 @@ for i in "${!options[@]}"; do # deuxième passe options, actions
-v | --version ) # version du script, en ligne et en place
fscript_get_version ;;
-h | --help | * ) # affichage help
f_help ;;
f_help
exit ;;
esac
done
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment