Index: /issm/trunk-jpl/externalpackages/valgrind/install-linux.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/valgrind/install-linux.sh	(revision 27427)
+++ /issm/trunk-jpl/externalpackages/valgrind/install-linux.sh	(revision 27428)
@@ -3,15 +3,20 @@
 
 
+## Constants
+#
+PREFIX="${ISSM_DIR}/externalpackages/valgrind/install" # Set to location where external package should be installed
+
 # Clean up
-rm -rf install
+rm -rf ${PREFIX} src
 
-# Download development version
-git clone git://sourceware.org/git/valgrind.git install
+# Download development version (the current release never supports the latest 
+# OS X releases)
+git clone git://sourceware.org/git/valgrind.git src
 
 # Configure
-cd install
+cd src
 ./autogen.sh
 ./configure \
-	--prefix="$ISSM_DIR/externalpackages/valgrind/install" \
+	--prefix="${PREFIX}" \
 	--enable-only64bit
 
Index: /issm/trunk-jpl/externalpackages/valgrind/install-mac.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/valgrind/install-mac.sh	(revision 27427)
+++ /issm/trunk-jpl/externalpackages/valgrind/install-mac.sh	(revision 27428)
@@ -8,12 +8,12 @@
 
 # Clean up
-rm -rf ${PREFIX}
+rm -rf ${PREFIX} src
 
 # Download development version (the current release never supports the latest 
 # OS X releases)
-git clone git://sourceware.org/git/valgrind.git ${PREFIX}
+git clone git://sourceware.org/git/valgrind.git src
 
 # Configure
-cd install
+cd src
 ./autogen.sh
 ./configure \
Index: /issm/trunk-jpl/jenkins/jenkins.sh
===================================================================
--- /issm/trunk-jpl/jenkins/jenkins.sh	(revision 27427)
+++ /issm/trunk-jpl/jenkins/jenkins.sh	(revision 27428)
@@ -28,6 +28,6 @@
 SERVER='https://ross.ics.uci.edu/jenkins'
 
-#Get configuration
-#Source config file{{{
+# Get configuration
+# Source config file {{{
 if [ $# -ne 1 ]; then
 	#no config file specified: exit
@@ -46,12 +46,11 @@
 EXAMPLES_TEST=0
 
-# Initialize resource variables (to avoid "i<=: syntax error: operand expected"
-# in for loops)
+# Initialize resource variables (to avoid "i<=: syntax error: operand expected" in for loops)
 NUMCPUS_INSTALL=1
 NUMCPUS_RUN=1
 
-#source configuration script
+# Source configuration script
 source $1;
-#}}}
+# }}}
 
 if [[ $EXAMPLES_TEST -eq 1 && $MATLAB_TEST+$PYTHON_TEST+$JAVASCRIPT_TEST -ne 0 ]]; then
@@ -60,6 +59,6 @@
 fi
 
-#Install ISSM
-#Determining installation type depending on svn changes{{{
+# Install ISSM
+# Determining installation type depending on svn changes {{{
 echo "======================================================";
 echo "             Determining Installation type            "
@@ -92,7 +91,6 @@
 	echo "   "
 
-	###################################
-	### Determine installation type ###
-	###################################
+	## Determine installation type
+	#
 	echo "Determining installation type"
 
@@ -107,5 +105,5 @@
 	fi
 
-	# If the Makefile or m4 diirectory were changed in any way or if certain
+	# If the Makefile or m4 directory were changed in any way or if certain
 	# binary files from a previous compilation do not exist, reconfigure
 	if [ ! -z "$(cat ${ISSM_DIR}/TEMP | grep -e "Makefile.am" -e "m4" )" ] ||
@@ -145,5 +143,5 @@
 echo "Recording current svn version: $SVN_REVISION_1"
 echo $SVN_REVISION_1 > ${ISSM_DIR}/svn_revision_old
-#}}}
+# }}}
 
 ## External Packages
@@ -153,16 +151,11 @@
 NUMPACKAGES=$(($(echo ${EXTERNALPACKAGES} | wc -w ) / 2))
 
-#Jenkins XML files for individual packages
+# Jenkins XML files for individual packages
 EXTERNAL_TEST_FILE="${ISSM_DIR}/nightlylog/results/external.xml"
 mkdir -p ${ISSM_DIR}/nightlylog/results
 echo "<testsuite tests=\"$NUMPACKAGES\">" > $EXTERNAL_TEST_FILE
 
-# Need a source here for when builds start midway through installation of externalpackages.
+# Need a source here for when builds start midway through installation of externalpackages
 source ${ISSM_DIR}/etc/environment.sh
-
-if [ "${OS}" == CYGWIN* ]; then
-	echo " == WINDOWS ENVIRONMENT DETECTED =="
-	source ${ISSM_DIR}/externalpackages/windows/windows_environment.sh
-fi
 
 EXTERNALPACKAGES_FAILED=0;
@@ -174,5 +167,5 @@
 	PACKAGEINST=$(echo $EXTERNALPACKAGES | cut -d " " -f $NUM2-$NUM2)
 
-	#install if requested or if previous install has not been successful
+	# Install if requested or if previous install has not been successful
 	if [ "${ISSM_EXTERNALPACKAGES}" == "yes" ]; then # NOTE: Removed check on if 'install' directory exist
 		cd ${ISSM_DIR}/externalpackages/$PACKAGENAME
@@ -199,5 +192,6 @@
 				echo '</failure>' >> $EXTERNAL_TEST_FILE
 				echo '</testcase>' >> $EXTERNAL_TEST_FILE
-				EXTERNALPACKAGES_FAILED=1;
+				echo '</testsuite>' >> $EXTERNAL_TEST_FILE
+				exit 1;
 			else
 				echo "<testcase classname=\"externalpackages\" name=\"$PACKAGENAME\"/>" >> $EXTERNAL_TEST_FILE
@@ -224,11 +218,4 @@
 echo '</testsuite>' >> $EXTERNAL_TEST_FILE
 
-if [ $EXTERNALPACKAGES_FAILED -eq 1 ]; then
-	echo "===================================================================================================";
-	echo "    ERROR: One or more of the externalpackages has failed. Skipping everything remaining steps.    ";
-	echo "===================================================================================================";
-	exit 1;
-fi
-
 # Source here to include any newly-installed external packages on the path
 source ${ISSM_DIR}/etc/environment.sh
@@ -246,5 +233,5 @@
 #	independent from running JavaScript tests (one should be able to do the
 #	former without having to do the latter).
-# - Revisit enviroment variables (especially EMCC_CFLAGS) once support for
+# - Revisit environment variables (especially EMCC_CFLAGS) once support for
 #	Fortran has been accomplished.
 #
@@ -261,6 +248,6 @@
 fi
 
-#}}}
-#ISSM compilation yes/no                (ISSM_COMPILATION) {{{
+# }}}
+# ISSM compilation yes/no (ISSM_COMPILATION) {{{
 if [ "${ISSM_COMPILATION}" == "yes" ]; then
 	cd $ISSM_DIR
@@ -285,10 +272,10 @@
 	fi
 
-	#4: compile and install ISSM
+	# Compile and install ISSM
 	echo "======================================================"
 	echo "                    Compiling ISSM                    "
 	echo "======================================================"
 	if [ $NUMCPUS_INSTALL -gt 1 ]; then
-		echo "Making with ${NUMCPUS_INSTALL} cpus"
+		echo "Making with ${NUMCPUS_INSTALL} CPUs"
 
 		# To debug compilation/linking, add 'V=1' option to the call to make
@@ -313,15 +300,14 @@
 	echo "Skipping ISSM compilation"
 else
-	echo "ISSM_COMPILATION supported values are: yes and no. Exiting..." >&2 # Error message to stderr.
+	echo "ISSM_COMPILATION supported values are: yes and no. Exiting..." >&2 # Redirect error messages to stderr
 	exit 1
 fi
-#}}}
-
-#Restore CXX/CC to their previous values
+# }}}
+
+# Restore CC/CXX to their previous values
+export CC=$CC_PREVIOUS
 export CXX=$CXX_PREVIOUS
-export CC=$CC_PREVIOUS
-
-#matlab tests
-# {{{
+
+# MATLAB tests {{{
 if [ $MATLAB_TEST -eq 1 ]; then
 	MINGW=0
@@ -333,7 +319,7 @@
 	fi
 
-	#Launch all tests on different cpus
+	# Launch all tests on different CPUs
 	for (( i=1;i<=$NUMCPUS_RUN;i++ )); do
-		#Launch matlab and the nightly run script
+		# Launch MATLAB and the nightly run script
 		cat > ${ISSM_DIR}/nightlylog/matlab_run$i.m << EOF
 		warning off %necessary to avoid a log of several Go for parallel runs
@@ -358,6 +344,6 @@
 		cd $ISSM_DIR/test/NightlyRun
 
-		# NOTE: We redirect all output to logfile in order to catch certain errors. For some reason, this does not work under Windows: the logifle option must be used and process must be run in background
-		if [[ "${OS}" == CYGWIN* || ${MINGW} -eq 1 ]]; then
+		# NOTE: We redirect all output to logfile in order to catch certain errors. For some reason, this does not work under Windows: the logfile option must be used and process must be run in background
+		if [[ ${MINGW} -eq 1 ]]; then
 			$MATLAB_PATH/bin/matlab -nodesktop -nosplash -nojvm -r "addpath ${ISSM_DIR_WIN}/src/m/dev; devpath; addpath ${ISSM_DIR_WIN}/nightlylog; matlab_run$i" -logfile ${ISSM_DIR_WIN}/nightlylog/matlab_log$i.log &
 		else
@@ -371,18 +357,5 @@
 	# - Replace by adding -wait option to above calls to matlab?
 	#
-	if [[ "${OS}" == CYGWIN* ]]; then
-		sleep 5;
-		echo "Waiting for MATLAB to exit"
-		pid=$(ps aux -W | grep MATLAB | awk '{printf("%s\n","MATLAB");}')
-		echo '-----------------------------'
-		echo "pid: ${pid}"
-		echo '-----------------------------'
-		while [ -n "${pid}" ]; do
-			pid=$(ps aux -W | grep MATLAB | awk '{printf("%s\n","MATLAB");}')
-			sleep 1;
-		done
-		echo "DONE!"
-	elif [[ ${MINGW} -eq 1 ]]; then
-		# NOTE: The PID query used here may work as well on Cygwin. If so, combine the two conditional blocks.
+	if [[ ${MINGW} -eq 1 ]]; then
 		sleep 5;
 		echo "Waiting for MATLAB to exit"
@@ -429,18 +402,18 @@
 	done
 
-	#filter out windows characters:
+	# Filter out Windows characters
 	cat matlab_log.log | tr -cd '\11\12\40-\176' > matlab_log.log2 && mv matlab_log.log2 matlab_log.log
 fi
 # }}}
 
-# Python tests
+# Python tests # {{{
 #
 # TODO: Figure out why "Running Python test for Rank $i" is printed twice for each CPU
-# {{{
+#
 if [ $PYTHON_TEST -eq 1 ]; then
-	#Launch all tests on different cpus
+	# Launch all tests on different CPUs
 	export PYTHONPATH="${ISSM_DIR}/src/m/dev"
 	export PYTHONSTARTUP="${PYTHONPATH}/devpath.py"
-	export PYTHONUNBUFFERED=1 #we don't want python to buffer otherwise issm.exe output is not captured
+	export PYTHONUNBUFFERED=1 # We don't want Python to buffer otherwise issm.exe output is not captured
 	for (( i=1;i<=$NUMCPUS_RUN;i++ ))
 	do
@@ -474,6 +447,5 @@
 rm -f $ISSM_DIR/execution/*/ADOLC-*
 
-# Examples Tests
-# {{{
+# Examples Tests # {{{
 if [ $EXAMPLES_TEST -eq 1 ]; then
 	export MATLAB_PATH
@@ -482,6 +454,5 @@
 # }}}
 
-# Process logs to be JUnit compatible
-#{{{
+# Process logs to be JUnit compatible # {{{
 cd $ISSM_DIR/nightlylog
 source $ISSM_EXT_DIR/shell2junit/install/bin/sh2ju.sh
@@ -489,5 +460,5 @@
 
 if [ $MATLAB_TEST -eq 1 ]; then
-	#number tests:
+	# Number tests
 	numtests=`cat matlab_log.log | grep "\-\-\-\-\-\-\-\-starting" | wc -l`
 	testlist=`cat matlab_log.log | grep "\-\-\-\-\-\-\-\-starting" | sed 's/----------------starting://g' | sed 's/-//g'`
@@ -515,5 +486,5 @@
 
 if [ $PYTHON_TEST -eq 1 ]; then
-	#number tests:
+	# Number tests
 	numtests=`cat python_log.log | grep "\-\-\-\-\-\-\-\-starting" | wc -l`
 	testlist=`cat python_log.log | grep "\-\-\-\-\-\-\-\-starting" | sed 's/----------------starting://g' | sed 's/-//g'`
@@ -569,3 +540,3 @@
 # Clean up execution directory
 rm -rf $ISSM_DIR/execution/*
-#}}}
+# }}}
Index: /issm/trunk-jpl/jenkins/ross-debian_linux-full-valgrind
===================================================================
--- /issm/trunk-jpl/jenkins/ross-debian_linux-full-valgrind	(revision 27427)
+++ /issm/trunk-jpl/jenkins/ross-debian_linux-full-valgrind	(revision 27428)
@@ -51,5 +51,4 @@
 	netcdf		install-4.7-parallel.sh
 	proj		install-6.sh
-	sqlite		install.sh
 	gdal		install-3-python.sh
 	gshhg		install.sh
