desktop/sweethome3d/sweethome3d.sh

25 lines
419 B
Bash
Raw Normal View History

2016-09-09 02:50:20 +08:00
#!/bin/sh
JAVA_EXEC=""
APP_ARGS=""
if [ -n "$JAVA_HOME" ]; then
if [ -x "$JAVA_HOME/bin/java" ]; then
JAVA_EXEC="$JAVA_HOME/bin/java"
fi
else
JAVA_EXEC="$(which java)"
fi
if [ -z "$JAVA_EXEC" ]; then
2016-12-05 08:42:38 +08:00
echo "No 'java' executable can be found, please set JAVA_HOME variable."
2016-09-09 02:50:20 +08:00
exit 1
fi
if [ $# -gt 0 ]
then
APP_ARGS="-open"
fi
"$JAVA_EXEC" -jar /usr/share/sweethome3d/sweethome3d.jar "$APP_ARGS" "$@"