summaryrefslogtreecommitdiffstats
path: root/config/chroot_local-includes/usr/local/bin/tails-documentation
blob: 36932d0c5b7f1dc2cef883d62922274b4d4713fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#! /bin/sh

if [ $# -ge 1 ]; then
   PAGE="$1"
else
   PAGE='index'
fi

WIKI_ROOT='/usr/share/doc/tails/website'
LANG_CODE="`echo ${LANG} | head -c 2`"

if [ -r "${WIKI_ROOT}/${PAGE}.${LANG_CODE}.html" ]; then
   FILE="${PAGE}.${LANG_CODE}.html"
elif  [ -r "${WIKI_ROOT}/${PAGE}.en.html" ]; then
   FILE="${PAGE}.en.html"
else
   FILE="${PAGE}.html"
fi

exec /usr/local/bin/tor-browser "file://${WIKI_ROOT}/${FILE}"