2015-01-07 18:23:21 +03:00
|
|
|
#!/bin/sh
|
2011-08-13 06:34:16 +04:00
|
|
|
|
2022-12-30 17:48:34 +03:00
|
|
|
language=$(locale -l)
|
|
|
|
# The locale can be a single 2 char language or in severall segments like en, se_SE or sr_Latn_ME
|
|
|
|
# this tries to get the 2 char language code from longer locales as a fallback
|
|
|
|
languageBase=$(echo $language | awk -F_ '{print $1}')
|
2011-08-13 06:34:16 +04:00
|
|
|
welcomeURL="\
|
2018-08-21 03:58:06 +03:00
|
|
|
https://www.haiku-os.org/docs/welcome/welcome_en.html"
|
2022-12-30 17:48:34 +03:00
|
|
|
welcomeFile=/boot/system/documentation/welcome/welcome_en.html
|
|
|
|
localizedWelcomeFile=/boot/system/documentation/welcome/welcome_"$language".html
|
|
|
|
localizedWelcomeFileBase=/boot/system/documentation/welcome/welcome_"$languageBase".html
|
2011-08-13 06:34:16 +04:00
|
|
|
|
|
|
|
if [ -f $localizedWelcomeFile ]; then
|
2022-12-30 17:48:34 +03:00
|
|
|
open file:$localizedWelcomeFile
|
|
|
|
elif [ -f $localizedWelcomeFileBase ]; then
|
|
|
|
open file:$localizedWelcomeFileBase
|
2011-08-13 06:34:16 +04:00
|
|
|
elif [ -f $welcomeFile ]; then
|
|
|
|
open $welcomeFile
|
|
|
|
else
|
|
|
|
open $welcomeURL
|
|
|
|
fi
|
|
|
|
|