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

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