[Lunar-commits] CVS: theedge/var/lib/lunar/functions main.lunar, 1.22, 1.23

Auke Kok sofar at lunar-linux.org
Fri Mar 18 09:58:26 UTC 2005


Update of /var/cvs/lunar/theedge/var/lib/lunar/functions
In directory espresso.foo-projects.org:/home/sofar/active/theedge/var/lib/lunar/functions

Modified Files:
	main.lunar 
Log Message:
Fix for the missing install log after a resurrect.


Index: main.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/main.lunar,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- main.lunar	18 Mar 2005 00:52:37 -0000	1.22
+++ main.lunar	18 Mar 2005 09:58:23 -0000	1.23
@@ -115,7 +115,7 @@
 }
 
 
-expand_cache_safe() { (
+expand_cache_safe() {(
   debug_msg "expand_cache_safe ($@)"
 
   export SOURCE_DIRECTORY=$BUILD_DIRECTORY/resurrect-$MODULE-$VERSION
@@ -127,9 +127,13 @@
   tar j --list < $1 > $TMP_TARGETS
   TMP_TARGETS_OK=$(temp_create "resurrect.targets_OK.$MODULE")
   # do directories: we don't care here
-  for TARGET in $(cat $TMP_TARGETS | directories) ; do
-    debug_msg "mkdir -p $TARGET"
-    mkdir -p $TARGET
+  # the sed trick is advanced: a non-greedy pattern that returns all
+  # directory names listed in the input
+  for TARGET in $(cat $TMP_TARGETS | sed 's/\/[^\/]*$/\//g' ) ; do
+	if [ ! -d $TARGET ]; then
+      debug_msg "mkdir -p $TARGET"
+      mkdir -p $TARGET
+    fi
   done
   # do links
   for TARGET in $(find $SOURCE_DIRECTORY -type l | sed "s:$SOURCE_DIRECTORY::g" ) ; do
@@ -143,7 +147,7 @@
   # do files - bulk process the normal ones
   cat $TMP_TARGETS | grep -v -f $EXCLUDED >> $TMP_TARGETS_OK
   # now double check the EXCLUDED ones
-  for TARGET in $(cat $TMP_TARGETS | files | grep -f $EXCLUDED ) ; do
+  for TARGET in $(cat $TMP_TARGETS | grep -f $EXCLUDED ) ; do
     if [ -e "$TARGET" ] ; then
       debug_msg "Cowardishly not overwriting \"$TARGET\""
     else



More information about the Lunar-commits mailing list