slitaz-forge view boot/index.cgi @ rev 188

tank: start to log some stuff
author Christophe Lincoln <pankso@slitaz.org>
date Tue Mar 20 22:51:27 2012 +0100 (2012-03-20)
parents 3d1dfcfb56d9
children 8f7ddeaffa3b
line source
1 #!/bin/sh
2 # Content negotiation for SliTaz Network
3 #
5 IFS=","
6 for lang in $HTTP_ACCEPT_LANGUAGE
7 do
8 lang=${lang%;*} lang=${lang# } lang=${lang%-*}
9 [ -d "$lang" ] && break
10 done
11 unset IFS
12 [ -d "$lang" ] || lang="en"
14 echo "Location: $lang/"
15 echo ""
17 exit 0