Index: /issm/trunk/packagers/macosx/package.sh
===================================================================
--- /issm/trunk/packagers/macosx/package.sh	(revision 22770)
+++ /issm/trunk/packagers/macosx/package.sh	(revision 22771)
@@ -7,8 +7,15 @@
 cp ../externalpackages/mpich/install/bin/mpiexec .
 cp ../externalpackages/mpich/install/bin/hydra_pmi_proxy .
+echo "move gmsh to bin" 
 if [ -f ../externalpackages/gmsh/install/gmsh ]; then
 	cp ../externalpackages/gmsh/install/gmsh .
 else
 	echo "gmsh not found"
+fi
+echo "move gmt to bin" 
+if [ -f ../externalpackages/gmt/install/gmt ]; then
+	cp ../externalpackages/gmt/install/gmt .
+else
+	echo "gmt not found"
 fi
 
Index: /issm/trunk/src/m/mesh/planet/gmsh/gmshplanet.m
===================================================================
--- /issm/trunk/src/m/mesh/planet/gmsh/gmshplanet.m	(revision 22770)
+++ /issm/trunk/src/m/mesh/planet/gmsh/gmshplanet.m	(revision 22771)
@@ -102,10 +102,21 @@
 	end
 
+	%Find path to gmsh
+	paths = {[issmdir() '/bin/gmsh'],[issmdir() '/externalpackages/gmsh/install/gmsh']};
+	gmshpath = '';
+	for i=paths
+		if exist(i{1},'file'),
+			gmshpath = i{1}
+		end
+	end
+	if isempty(gmshpath),
+		error('gmt not found, make sure it is properly installed');
+	end
+
 	%call gmsh
 	if  exist(options,'refine'),
-		eval(['!gmsh -tol 1e-8 -2 sphere.geo -bgm sphere.pos']);
+		system([gmshpath ' -tol 1e-8 -2 sphere.geo -bgm sphere.pos']);
 	else
-		%call gmsh
-		eval(['!gmsh -tol 1e-8 -2 sphere.geo']);
+		system([gmshpath ' -tol 1e-8 -2 sphere.geo']);
 	end
 
@@ -163,5 +174,5 @@
 
 	%erase files: 
-	eval(['!rm -rf sphere.geo sphere.msh sphere.pos']);
+	system('rm -rf sphere.geo sphere.msh sphere.pos');
 
 	%return mesh: 
