#!/bin/sh

if [ "$ISE_PLATFORM" = "macosx-x86-64" ] || [ "$ISE_PLATFORM" = "macosx-x86" ]; then
	open $1
else
	if [ -x "$(command -v "xdg-open")" ]; then
		xdg-open $1
	elif [ -x "$(command -v "x-www-browser")" ]; then
		x-www-browser $1
	elif [ -x "$(command -v "firefox")" ]; then
		firefox $1
	elif [ -x "$(command -v "chromium")" ]; then
		chromium $1
	else
		echo "Error: can not find web browser"
	fi
fi
