home *** CD-ROM | disk | FTP | other *** search
/ PCNET 2006 November - Disc 1 / PCNET_CD_2006_11_1.iso / linux / gparted-livecd-0.3.1-1.iso / gparted / usr / libexec / TerminalHelp < prev    next >
Encoding:
Text File  |  2006-09-03  |  1.4 KB  |  51 lines

  1. #!/bin/sh
  2. #
  3. # $Id: TerminalHelp.in 20143 2006-03-01 14:36:26Z benny $
  4. #
  5. # Copyright (c) 2004-2006 os-cillation e.K.
  6. #
  7. # This program is free software; you can redistribute it and/or modify
  8. # it under the terms of the GNU General Public License as published by
  9. # the Free Software Foundation; either version 2 of the License, or
  10. # (at your option) any later version.
  11. #
  12. # This program is distributed in the hope that it will be useful,
  13. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15. # GNU General Public License for more details.
  16. #
  17. # You should have received a copy of the GNU General Public License
  18. # along with this program; if not, write to the Free Software
  19. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  20. #
  21.  
  22. HELPDIR="/usr/share/doc/Terminal/"
  23.  
  24. if test -n "$LC_ALL"; then
  25.   LC=$LC_ALL
  26. elif test -n "$LANG"; then
  27.   LC=$LANG
  28. else
  29.   LC="C"
  30. fi
  31.  
  32. if test -n "$1"; then
  33.   HELPFILE="$1.html"
  34. else
  35.   HELPFILE="index.html"
  36. fi
  37.  
  38. if test -r "$HELPDIR/$LC/$HELPFILE"; then
  39.   URL="$HELPDIR/$LC/$HELPFILE"
  40. elif test -r "$HELPDIR/`echo $LC | sed 's/\(..\)_.*/\1/'`/$HELPFILE"; then
  41.   URL="$HELPDIR/`echo $LC | sed 's/\(..\)_.*/\1/'`/$HELPFILE"
  42. else 
  43.   URL="$HELPDIR/C/index.html"
  44. fi
  45.  
  46. [ -n "$2" ] && URL="$URL#$2"
  47.  
  48. exec exo-open --launch WebBrowser "file://$URL"
  49.  
  50. # vim:set ts=2 sw=2 et ai:
  51.