Version 1.1

Changed "http://ip-api.com/json/" to "http://www.ip-api.com/json/".
This commit is contained in:
Locutus73
2019-01-08 19:29:43 +01:00
committed by GitHub
parent e4bde45e37
commit a22e70676e

View File

@@ -18,9 +18,10 @@
# You can download the latest version of this script from:
# https://github.com/MiSTer-devel/Scripts_MiSTer
# Version 1.1 - 2019-01-08 - Changed "http://ip-api.com/json/" to "http://www.ip-api.com/json/".
# Version 1.0 - 2019-01-08 - First commit.
TIMEZONE="$(curl -ksLf "http://ip-api.com/json/" | grep -o "\"timezone\" *: *\"[^\"]*" | grep -o "[^\"]*$")"
TIMEZONE="$(curl -ksLf "http://www.ip-api.com/json/" | grep -o "\"timezone\" *: *\"[^\"]*" | grep -o "[^\"]*$")"
if echo "$TIMEZONE" | grep -q "/"
then
cp "/usr/share/zoneinfo/posix/$TIMEZONE" "/media/fat/timezone"