#!/bin/sh

#call the "Python" wrapper:
exe_name=$(basename $0)
#ie: APP_DIR=/Volumes/Xpra/Contents/Helpers
full_path=$(cd "$(dirname "$0")"; pwd -P)
#ie: APP_DIR=/Volumes/Xpra/Contents
CONTENTS_DIR=`dirname "$full_path"`
MANUAL="$CONTENTS_DIR/Resources/share/manual.html"

if [ -e "$MANUAL" ]; then
	open "$MANUAL"
else
	echo "Sorry, the manual page could not be found"
	echo "Opening the version found in the source repository"
	open "https://github.com/Xpra-org/xpra/blob/master/fs/share/man/man1/xpra.1"
fi
