mirror of https://framagit.org/kyodev/kyopages.git
1.2.0
This commit is contained in:
parent
a3dc2bf234
commit
4cfee6af07
|
@ -1,22 +1,23 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
# mise à jour 26/07/2017
|
||||||
|
|
||||||
user_agent="Mozilla/5.0 (X11; Linux $(uname -m); rv:54.0) Gecko/20100101 Firefox/54.0"
|
user_agent="Mozilla/5.0 (X11; Linux $(uname -m); rv:54.0) Gecko/20100101 Firefox/54.0"
|
||||||
file_tempo_test="tempoTest-$RANDOM"
|
file_tempo_test="tempoTest-$RANDOM"
|
||||||
|
|
||||||
# test wget, $1 url à tester, $2 objet, affiche url testée & entêtes http & location
|
# test wget, $1 url à tester, $2 objet, affiche url testée & entêtes http & location
|
||||||
f__wget_entete(){
|
f__wget_entete_diag(){
|
||||||
wget -Sq --tries=1 --timeout=10 --user-agent="$user_agent" --spider --save-headers "$1" &>$file_tempo_test
|
wget -Sq --tries=1 --timeout=10 --user-agent="$user_agent" --spider --save-headers "$1" &>$file_tempo_test
|
||||||
http="$(grep -i 'HTTP/' $file_tempo_test)"
|
local http="$(grep -i 'HTTP/' $file_tempo_test)"
|
||||||
http=" $(echo $http | tr -d '\n')"
|
http=" $(echo $http | tr -d '\n')"
|
||||||
location="$(grep -i 'location' $file_tempo_test)"
|
local location="$(grep -i 'location' $file_tempo_test)"
|
||||||
echo "$2: $1"
|
echo "$2: $1"
|
||||||
echo "$http"
|
echo "$http"
|
||||||
echo "$http" | grep '40' &>/dev/null && echo " ERREUR 404" || echo "$location"
|
echo "$http" | grep '40' &>/dev/null && echo " ERREUR 404" || echo "$location"
|
||||||
}
|
}
|
||||||
|
|
||||||
for architecture in linux linux64; do
|
for architecture in linux linux64; do
|
||||||
echo ""
|
echo -e "\nArchitecture: $architecture"
|
||||||
echo "Architecture: $architecture"
|
|
||||||
echo "====================="
|
echo "====================="
|
||||||
for product in latest esr beta dev nightly; do
|
for product in latest esr beta dev nightly; do
|
||||||
if [ "$product" == "latest" ]; then
|
if [ "$product" == "latest" ]; then
|
||||||
|
@ -29,7 +30,7 @@ for architecture in linux linux64; do
|
||||||
recup_url="https://download.mozilla.org/?product=firefox-devedition-latest-ssl&os=$architecture&lang=fr"
|
recup_url="https://download.mozilla.org/?product=firefox-devedition-latest-ssl&os=$architecture&lang=fr"
|
||||||
elif [ "$product" == "nightly" ]; then
|
elif [ "$product" == "nightly" ]; then
|
||||||
recup_url="https://download.mozilla.org/?product=firefox-$product-latest-l10n-ssl&os=$architecture&lang=fr" ;fi
|
recup_url="https://download.mozilla.org/?product=firefox-$product-latest-l10n-ssl&os=$architecture&lang=fr" ;fi
|
||||||
f__wget_entete "$recup_url" "$product"
|
f__wget_entete_diag "$recup_url" "$product"
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue