diff --git a/contrib/nightly/create_tarball.sh b/contrib/nightly/create_tarball.sh index 174b4e6b35..bb48f38bdb 100755 --- a/contrib/nightly/create_tarball.sh +++ b/contrib/nightly/create_tarball.sh @@ -143,6 +143,14 @@ if test ! -d "$destdir"; then die "Could not cd to dest dir: $destdir" fi +# make sure we can write to the destdir +file="$destdir/test-write.$$" +touch "$file" +if test ! -f "$file"; then + die "Could not write to the dest dir: $destdir" +fi +rm -f "$file" + # if there's a $destdir/latest_snapshot.txt, see if anything has # happened since that r number. desired_r= @@ -299,6 +307,18 @@ save= gz="`/bin/ls openmpi*tar.gz`" bz2="`/bin/ls openmpi*tar.bz2`" mv $gz $bz2 $destdir +if test "$?" != "0"; then + cat <