--- next_build.sh.orig	2012-02-23 08:03:52.000000000 +0100
+++ next_build.sh	2012-02-23 08:05:36.000000000 +0100
@@ -56,8 +56,8 @@
 # see if svnversion is available
 which svnversion >/dev/null 2>/dev/null
 if [ $? -eq 0 ]; then
-    build=`svnversion|sed s/M//|sed s/:.*$//`
-    if [ "$build" != "exported" ]; then
+    build=`svnversion|sed -e s/M// -e s/:.*$// -e 's/ .*$//'`
+    if [ "$build" != "exported" -a "$build" != "Unversioned" ]; then
 	make_file $file
 	ok=1
     fi
