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

search.sh: fix FileOverlap
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Jul 15 14:20:00 2012 +0200 (2012-07-15)
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