--- ./geogebra.orig	2012-10-07 13:54:43.000000000 +0200
+++ ./geogebra	2012-10-07 13:56:32.000000000 +0200
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #---------------------------------------------
 # Script to start GeoGebra
 #---------------------------------------------
@@ -184,19 +184,19 @@
 	--help | --hel | --he | --h )
 		func_usage; exit 0 ;;
 	esac
-	if [ $(expr match "$i" '.*--') -ne 0 ]; then
+	if [ $(expr -- "$i" : '.*--') -ne 0 ]; then
 		GG_OPTS[${#GG_OPTS[*]}]="$i"
 		shift $((1))
-	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" '.*-JavaCMD') -ne 0 ]; then
+	elif [ $(expr -- "$i" : '.*-JavaCMD') -ne 0 ]; then
 		JAVACMD=${i:9}
 		shift $((1))
 	fi
