Index: ../trunk-jpl/jenkins/jenkins.sh
===================================================================
--- ../trunk-jpl/jenkins/jenkins.sh	(revision 18635)
+++ ../trunk-jpl/jenkins/jenkins.sh	(revision 18636)
@@ -191,20 +191,15 @@
 	exit
 EOF
 	cd $ISSM_DIR/test/NightlyRun
-	$MATLAB_PATH/bin/matlab -nojvm -nosplash -r "addpath $ISSM_DIR/src/m/dev; devpath; addpath $ISSM_DIR/nightlylog/; matlab_run$i" -logfile $ISSM_DIR/nightlylog/matlab_log$i.log &
+	if [ "$OS" = "win7" ]; then
+		$MATLAB_PATH/bin/matlab -nojvm -nosplash -r "addpath $ISSM_DIR/src/m/dev; devpath; addpath $ISSM_DIR/nightlylog/; matlab_run$i" -logfile $ISSM_DIR/nightlylog/matlab_log$i.log
+	else
+		$MATLAB_PATH/bin/matlab -nojvm -nosplash -r "addpath $ISSM_DIR/src/m/dev; devpath; addpath $ISSM_DIR/nightlylog/; matlab_run$i" -logfile $ISSM_DIR/nightlylog/matlab_log$i.log &
+	fi
 done
 
 #wait until matlab closes
-if [ "$OS" = "win7" ]; then
-	echo "HERE"
-	ps aux -W | grep MATLAB
-	pid=$(ps aux -W | grep MATLAB | awk '{printf("%s\n",MATLAB);}')
-
-	while [ -n "$pid" ]
-	do
-		pid=$(ps aux -W | grep MATLAB | awk '{printf("%s\n",MATLAB);}')
-	done
-else
+if [ "$OS" != "win7" ]; then
 	wait
 fi
 
