From 7a27caa5f451fc96b620a0582bad3c780ef8bdef Mon Sep 17 00:00:00 2001 From: Nathaniel Graff Date: Thu, 11 Apr 2019 11:10:32 -0700 Subject: Add make target to open local documentation Signed-off-by: Nathaniel Graff --- scripts/open-docs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 scripts/open-docs (limited to 'scripts/open-docs') diff --git a/scripts/open-docs b/scripts/open-docs new file mode 100755 index 0000000..82d0f91 --- /dev/null +++ b/scripts/open-docs @@ -0,0 +1,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 + -- cgit v1.2.3