diff --git a/utils/nightly/linux.sh b/utils/nightly/linux.sh
index fc218cc1735696841d154291c867ca35bc10eebc..1de5520f07cebf8918ac7c1134debb820610056e 100755
--- a/utils/nightly/linux.sh
+++ b/utils/nightly/linux.sh
@@ -5,9 +5,9 @@ GMSH=${HOME}/src/gmsh
 LOG=${GMSH}/nightly.log
 WEB_BIN=geuzaine@geuz.org:/home/www/geuz.org/gmsh/bin/Linux
 CMAKE=/usr/local/bin/cmake
-PETSC_DIR=${HOME}/src/petsc-3.0.0-p12
-SLEPC_DIR=${HOME}/src/slepc-3.0.0-p7
-PETSC_ARCH=linux_complex_umfpack
+export PETSC_DIR=${HOME}/src/petsc-3.0.0-p12
+export SLEPC_DIR=${HOME}/src/slepc-3.0.0-p7
+export PETSC_ARCH=linux_complex_umfpack
 
 rm -f ${LOG}
 rm -rf ${GMSH}/bin
diff --git a/utils/nightly/mac.sh b/utils/nightly/mac.sh
index d6f790db289b43a10d87807c9138a767b31a83e0..e7e976ec3a422b234f8847871bcdc7bcb3357152 100755
--- a/utils/nightly/mac.sh
+++ b/utils/nightly/mac.sh
@@ -5,9 +5,9 @@ GMSH=${HOME}/src/gmsh
 LOG=${GMSH}/nightly.log
 WEB_BIN=geuzaine@geuz.org:/home/www/geuz.org/gmsh/bin/MacOSX
 CMAKE=/usr/local/bin/cmake
-PETSC_DIR=${HOME}/src/petsc-3.0.0-p7
-PETSC_ARCH=umfpack-cxx-opt
-SLEPC_DIR=${HOME}/src/slepc-3.0.0-p7
+export PETSC_DIR=${HOME}/src/petsc-3.0.0-p7
+export PETSC_ARCH=umfpack-cxx-opt
+export SLEPC_DIR=${HOME}/src/slepc-3.0.0-p7
 
 rm -f ${LOG}
 rm -rf ${GMSH}/bin
diff --git a/utils/nightly/windows.sh b/utils/nightly/windows.sh
index 729afa9cdf1767590a1d61f9c44ae7f67f371ce2..0cdf6508f136b5a51907be905f7c9b2eb50956e2 100755
--- a/utils/nightly/windows.sh
+++ b/utils/nightly/windows.sh
@@ -5,12 +5,12 @@ GMSH=${HOME}/src/gmsh
 LOG=${GMSH}/nightly.log
 WEB_BIN=geuzaine@geuz.org:/home/www/geuz.org/gmsh/bin/Windows
 CMAKE=cmake
-CC=/usr/bin/i686-w64-mingw32-gcc.exe
-CXX=/usr/bin/i686-w64-mingw32-g++.exe
-FC=/usr/bin/i686-w64-mingw32-gfortran.exe
-PETSC_DIR=${HOME}/src/petsc-3.0.0-p12
-SLEPC_DIR=${HOME}/src/slepc-3.0.0-p7
-PETSC_ARCH=win32_complex_umfpack
+export CC=/usr/bin/i686-w64-mingw32-gcc.exe
+export CXX=/usr/bin/i686-w64-mingw32-g++.exe
+export FC=/usr/bin/i686-w64-mingw32-gfortran.exe
+export PETSC_DIR=${HOME}/src/petsc-3.0.0-p12
+export SLEPC_DIR=${HOME}/src/slepc-3.0.0-p7
+export PETSC_ARCH=win32_complex_umfpack
 
 rm -f ${LOG}
 rm -rf ${GMSH}/bin