MYNT-EYE-S-SDK/scripts/open.sh
2018-03-09 11:52:49 +08:00

20 lines
356 B
Bash
Executable File

#!/usr/bin/env bash
BASE_DIR=$(cd "$(dirname "$0")" && pwd)
source "$BASE_DIR/common/echo.sh"
source "$BASE_DIR/common/host.sh"
if [ "$HOST_OS" = "Linux" ]; then
OPEN="xdg-open"
elif [ "$HOST_OS" = "Mac" ]; then
OPEN="open"
elif [ "$HOST_OS" = "Win" ]; then
OPEN="start"
else
_echo_e "Unknown host os :("
exit 1
fi
[ $# -gt 0 ] && $OPEN "$@"