summaryrefslogtreecommitdiffstats
path: root/about/about-mageia
blob: f37d256e1e9525b67b7d36577848f9103a98fe14 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh
WGET="$(which wget)"

$WGET -q --tries=20 --timeout=10 http://www.google.com -O /tmp/google.idx &> /dev/null
if [ ! -s /tmp/google.idx ]; then
    echo "ERROR: No internet connection detected.
In order to display About Mageia page you should have an working connection."
	exit 1
else
	for lang in `echo $LANG:$LANGUAGE | tr ':' ' ' | cut -d'_' -f1` ; do
	    $WGET -q --tries=20 --timeout=10 http://www.mageia.org/$lang/about -O /tmp/mageiaorg.idx &> /dev/null
	    if [ ! -s /tmp/mageiaorg.idx ]; then
	        echo "WARNING: There is no localized Mageia About web page;
displaying English web page"
            xdg-open "http://www.mageia.org/en/about"
        else
            xdg-open "http://www.mageia.org/$lang/about"
            exit 0
        fi
	done
fi