summaryrefslogtreecommitdiff
path: root/scripts/open-docs
blob: 82d0f91569d9ce83dd40ce61607ea82177977230 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/env sh

SDK_PATH="$( cd "$(dirname "$0")/.." ; pwd -P )"
DOCS_PATH=$SDK_PATH/doc/html/index.html

XDG_OPEN=`which xdg-open`
OPEN=`which open`

if [ "$XDG_OPEN" != "" ]; then
        echo "Opening $DOCS_PATH"
        $XDG_OPEN $DOCS_PATH

elif [ "$OPEN" != "" ]; then
        echo "Opening $DOCS_PATH"
        $OPEN $DOCS_PATH

else
        echo "Please open $DOCS_PATH in your preferred HTML viewer"
fi