slitaz-forge annotate 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 |
rev | line source |
---|---|
pankso@63 | 1 #!/bin/sh |
pankso@149 | 2 # Content negotiation for SliTaz Network |
pankso@63 | 3 # |
pankso@63 | 4 |
pankso@63 | 5 IFS="," |
pankso@63 | 6 for lang in $HTTP_ACCEPT_LANGUAGE |
pankso@63 | 7 do |
pankso@63 | 8 lang=${lang%;*} lang=${lang# } lang=${lang%-*} |
pankso@63 | 9 [ -d "$lang" ] && break |
pankso@63 | 10 done |
pankso@63 | 11 unset IFS |
pankso@149 | 12 [ -d "$lang" ] || lang="en" |
pankso@63 | 13 |
pankso@63 | 14 echo "Location: $lang/" |
pankso@63 | 15 echo "" |
pankso@63 | 16 |
pankso@63 | 17 exit 0 |