1#!/bin/sh 2 3language=$(locale -l) 4# The locale can be a single 2 char language or in severall segments like en, se_SE or sr_Latn_ME 5# this tries to get the 2 char language code from longer locales as a fallback 6languageBase=$(echo $language | awk -F_ '{print $1}') 7quicktourURL="\ 8 https://www.haiku-os.org/docs/welcome/en/quicktour.html" 9quicktour=/boot/system/documentation/welcome/en/quicktour.html 10localizedQuicktour=/boot/system/documentation/welcome/"$language"/quicktour.html 11localizedQuicktourBase=/boot/system/documentation/welcome/"$languageBase"/quicktour.html 12 13if [ -f $localizedQuicktour ]; then 14 open file:$localizedQuicktour 15elif [ -f $localizedQuicktourBase ]; 16 open file:$localizedQuicktourBase 17elif [ -f $quicktour ]; then 18 open $quicktour 19else 20 open $quicktourURL 21fi 22