[Lunar-commits] CVS: theedge/var/lib/lunar/functions sources.lunar, 1.25, 1.26

Auke Kok sofar at lunar-linux.org
Mon Oct 25 19:15:22 UTC 2004


Update of /var/cvs/lunar/theedge/var/lib/lunar/functions
In directory espresso.foo-projects.org:/tmp/cvs-serv992

Modified Files:
	sources.lunar 
Log Message:
Fix nonexistant $BUILD_DIRECTORY on clean boxes or when wiped by the user


Index: sources.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/sources.lunar,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- sources.lunar	18 Oct 2004 07:32:54 -0000	1.25
+++ sources.lunar	25 Oct 2004 19:15:19 -0000	1.26
@@ -289,7 +289,12 @@
 mk_source_dir() {
   debug_msg "mk_source_dir ($@)"
 
-  cd $BUILD_DIRECTORY
+  # yes this sounds weird but it might happen: no dir $BUILD_DIRECTORY on
+  # clean boxes!
+  if [ ! -e "$BUILD_DIRECTORY" ] ; then
+    mkdir -p "$BUILD_DIRECTORY"
+  fi
+  cd "$BUILD_DIRECTORY"
   NEW_DIR=$1
   NEW_DIR=${NEW_DIR:=$SOURCE_DIRECTORY}
 



More information about the Lunar-commits mailing list