--- ./geogebra.orig 2013-04-21 14:18:22.000000000 +0200 +++ ./geogebra 2013-04-21 14:19:26.000000000 +0200 @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash #--------------------------------------------- # Script to start GeoGebra #--------------------------------------------- @@ -330,42 +330,42 @@ --help | --hel | --he | --h ) func_usage; exit 0 ;; esac - if [ $(expr match "$i" '.*--') -ne 0 ]; then - if [ $(expr match "$i" '.*--showSplash=') -ne 0 ]; then + if [ $(expr -- "$i" '.*--') -ne 0 ]; then + if [ $(expr -- "$i" '.*--showSplash=') -ne 0 ]; then GG_SHOWSPLASH=${i:13} shift $((1)) - elif [ $(expr match "$i" '.*--enableUndo=') -ne 0 ]; then + elif [ $(expr -- "$i" '.*--enableUndo=') -ne 0 ]; then GG_ENABLEUNDO=${i:13} shift $((1)) - elif [ $(expr match "$i" '.*--antiAliasing=') -ne 0 ]; then + elif [ $(expr -- "$i" '.*--antiAliasing=') -ne 0 ]; then GG_ANTIALIASING=${i:15} shift $((1)) - elif [ $(expr match "$i" '.*--versionCheckAllow=') -ne 0 ]; then + elif [ $(expr -- "$i" '.*--versionCheckAllow=') -ne 0 ]; then GG_VERSIONCHECKALLOW=${i:20} shift $((1)) - elif [ $(expr match "$i" '.*--settingsfile=') -ne 0 ]; then + elif [ $(expr -- "$i" '.*--settingsfile=') -ne 0 ]; then GG_SETTINGS_FILE=${i:15} shift $((1)) else GG_OPTS[${#GG_OPTS[*]}]="$i" shift $((1)) fi - elif [ $(expr match "$i" '.*-Xms') -ne 0 ]; then + elif [ $(expr -- "$i" '.*-Xms') -ne 0 ]; then GG_XMS=${i:4} shift $((1)) - elif [ $(expr match "$i" '.*-Xmx') -ne 0 ]; then + elif [ $(expr -- "$i" '.*-Xmx') -ne 0 ]; then GG_XMX=${i:4} shift $((1)) - elif [ $(expr match "$i" '.*-Djava.library.path=') -ne 0 ]; then + elif [ $(expr -- "$i" '.*-Djava.library.path=') -ne 0 ]; then GG_DJAVA_LIBRARY_PATH=${i:20} shift $((1)) - elif [ $(expr match "$i" '.*-Dsun.java2d.xrender=') -ne 0 ]; then + elif [ $(expr -- "$i" '.*-Dsun.java2d.xrender=') -ne 0 ]; then GG_DSUN_JAVA2D_XRENDER=${i:21} shift $((1)) - elif [ $(expr match "$i" '.*-Dsun.java2d.opengl=') -ne 0 ]; then + elif [ $(expr -- "$i" '.*-Dsun.java2d.opengl=') -ne 0 ]; then GG_DSUN_JAVA2D_OPENGL=${i:20} shift $((1)) - elif [ $(expr match "$i" '.*-JavaCMD=') -ne 0 ]; then + elif [ $(expr -- "$i" '.*-JavaCMD=') -ne 0 ]; then JAVACMD=${i:9} shift $((1)) fi