cedadev / online_ca_client

1 stars 1 forks source link

internationalisation problem in onlineca-get-trustroots-wget.sh #5

Open alaniwi opened 5 years ago

alaniwi commented 5 years ago

The script looks for a line such as:

HTTP request sent, awaiting response... 200 OK

in the wget output, but it fails if the user has a different language setting.

For example:

$ LC_ALL=fr_FR ./onlineca-get-trustroots-wget.sh -U https://slcs.jasmin.ac.uk/trustroots/ -b
Bootstrapping Short-Lived Credential Service root of trust.
Get trust roots failed
[... etc ..]

In this case the wget output includes

requête HTTP transmise, en attente de la réponse...200 OK

so this code fails:

wget_statcode_line="awaiting response..."
responsecode=$(echo "$error_output"|grep "$wget_statcode_line"|awk '{print $6}')

It may be possible to work around it by putting explicitly in the script

LC_ALL=en_GB.UTF-8 wget ...etc...