source: src-qt4/xtrafiles/local/share/pcbsd/scripts/openhandbook.sh @ 3a98f96

releng/10.0
Last change on this file since 3a98f96 was 3a98f96, checked in by Kris Moore <kris@…>, 11 months ago

Add mupdf as one of the launchers for the handbook

  • Property mode set to 100755
File size: 499 bytes
Line 
1#!/bin/sh
2
3hDir="/usr/local/share/pcbsd/doc"
4hFile="handbook"
5
6apps="okular mupdf xpdf"
7
8# Find a valid PDF viewer
9for app in $apps
10do
11        which $app >/dev/null 2>/dev/null
12        if [ $? -eq 0 ] ; then
13                viewer=$app
14                break
15        fi
16done
17
18if [ -z "$viewer" ] ; then
19        echo "Error: No PDF viewer found."
20        exit 1
21fi
22
23if [ -z "$LANG" ] ; then
24        $viewer ${hDir}/${hFile}_en.pdf
25else
26        if [ -e "${hDir}/${hFile}_${LANG}.pdf" ] ; then
27                $viewer ${hDir}/${hFile}_${LANG}.pdf
28        else
29                $viewer ${hDir}/${hFile}_en.pdf
30        fi
31fi
Note: See TracBrowser for help on using the repository browser.