Skip to content

Commit

Permalink
Added two scripts, which attempt to load the appropriate localized docs.
Browse files Browse the repository at this point in the history
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42630 a95241bf-73f2-0310-859d-f6bbb57e9c96
  • Loading branch information
mmadia committed Aug 13, 2011
1 parent 5c6260d commit 5b9c041
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 4 deletions.
8 changes: 8 additions & 0 deletions build/jam/HaikuImage
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,14 @@ SEARCH on installoptionalpackage = [ FDirName $(HAIKU_TOP) data bin ] ;
AddFilesToHaikuImage system bin : installoptionalpackage ;
SEARCH on install-wifi-firmwares.sh = [ FDirName $(HAIKU_TOP) data bin ] ;
AddFilesToHaikuImage system bin : install-wifi-firmwares.sh ;
SEARCH on welcome = [ FDirName $(HAIKU_TOP) data bin ] ;
AddFilesToHaikuImage system bin : welcome ;
AddSymlinkToHaikuImage home Desktop
: /boot/system/bin/welcome : Welcome ;
SEARCH on userguide = [ FDirName $(HAIKU_TOP) data bin ] ;
AddFilesToHaikuImage system bin : userguide ;
AddSymlinkToHaikuImage home Desktop
: /boot/system/bin/userguide : User\ Guide ;

# Add the files to be used by installoptionalpackage.
AddDirectoryToHaikuImage common data optional-packages ;
Expand Down
4 changes: 0 additions & 4 deletions build/jam/OptionalPackages
Original file line number Diff line number Diff line change
Expand Up @@ -1684,10 +1684,6 @@ if [ IsOptionalHaikuImagePackageAdded Welcome ] {
CopyDirectoryToHaikuImage system documentation
: [ FDirName $(HAIKU_TOP) docs userguide ]
: userguide : -x .svn ;
AddSymlinkToHaikuImage home Desktop
: /boot/system/documentation/welcome/welcome_en.html : Welcome ;
AddSymlinkToHaikuImage home Desktop
: /boot/system/documentation/userguide/en/contents.html : User\ Guide ;
}


Expand Down
16 changes: 16 additions & 0 deletions data/bin/userguide
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

userGuideURL="\
http://svn.haiku-os.org/haiku/haiku/trunk/docs/userguide/en/contents.html"
userGuideDir=/boot/system/documentation/userguide/
userGuide=$userGuideDir/en/contents.html
localizedUserGuide=$userGuideDir/"$LANG"/contents.html

if [ -f $localizedUserGuide ]; then
open file://$localizedUserGuide
elif [ -f $userGuide ]; then
open $userGuide
else
open $userGuideURL
fi

16 changes: 16 additions & 0 deletions data/bin/welcome
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

welcomeURL="\
http://svn.haiku-os.org/haiku/haiku/trunk/docs/welcome/welcome_en.html"
welcomeDir=/boot/system/documentation/welcome/
welcomeFile=$welcomeDir/welcome_en.html
localizedWelcomeFile=$welcomeDir/welcome_"$LANG".html

if [ -f $localizedWelcomeFile ]; then
open file://$localizedWelcomeFile
elif [ -f $welcomeFile ]; then
open $welcomeFile
else
open $welcomeURL
fi

0 comments on commit 5b9c041

Please sign in to comment.