r2520 - jhalfs/branches/experimental/common

manuel at linuxfromscratch.org manuel at linuxfromscratch.org
Sun Apr 9 13:31:20 PDT 2006


Author: manuel
Date: 2006-04-09 14:31:19 -0600 (Sun, 09 Apr 2006)
New Revision: 2520

Modified:
   jhalfs/branches/experimental/common/config
   jhalfs/branches/experimental/common/func_ICA.sh
Log:
Added wrt_do_X_work functions.

Modified: jhalfs/branches/experimental/common/config
===================================================================
--- jhalfs/branches/experimental/common/config	2006-04-09 19:05:17 UTC (rev 2519)
+++ jhalfs/branches/experimental/common/config	2006-04-09 20:31:19 UTC (rev 2520)
@@ -68,18 +68,18 @@
 #--- Run ICA testing 0(no)/1(yes)
 RUN_ICA=0
 
-#--- ICA report log directory
-ICALOGDIR=$JHALFSDIR/logs/ICA
-
 #--- Run farce testing 0(no)/1(yes)
 RUN_FARCE=0
 
-#--- farce report log directory
-FARCELOGDIR=$JHALFSDIR/logs/farce
-
 #==== INTERNAL VARIABLES ====
 # Don't edit it unless you know what you are doing
 
 #--- Working directories
 JHALFSDIR=$BUILDDIR/jhalfs
    LOGDIR=$JHALFSDIR/logs
+
+#--- ICA report log directory
+ICALOGDIR=$LOGDIR/ICA
+
+#--- farce report log directory
+FARCELOGDIR=$LOGDIR/farce

Modified: jhalfs/branches/experimental/common/func_ICA.sh
===================================================================
--- jhalfs/branches/experimental/common/func_ICA.sh	2006-04-09 19:05:17 UTC (rev 2519)
+++ jhalfs/branches/experimental/common/func_ICA.sh	2006-04-09 20:31:19 UTC (rev 2520)
@@ -32,21 +32,15 @@
       echo "$ITERATION:  chapter06" >> $MKFILE
       wrt_prepare        "$ITERATION"
       wrt_logs_and_clean "$ITERATION"
-      echo -e "\t at touch \$@\n" >> $MKFILE
       PREV=$ITERATION
     elif [ "$N" = "$ITERATIONS" ] ; then
       echo "iteration-last:  $PREV  system_rebuild" >> $MKFILE
-      wrt_prepare        "$ITERATION"
+      wrt_prepare        "$ITERATION" "$PREV"
       wrt_logs           "$ITERATION"
-      #I need to gigure out how to handle this for ITERATIONS > 2
-      # @do_ica_work $1 $2
-      # @farce $1 $2
-      echo -e "\t at touch \$@\n" >> $MKFILE
     else
       echo "$ITERATION:  $PREV  system_rebuild" >> $MKFILE
-      wrt_prepare        "$ITERATION"
+      wrt_prepare        "$ITERATION" "$PREV"
       wrt_logs_and_clean "$ITERATION"
-      echo -e "\t at touch \$@\n" >> $MKFILE
       PREV=$ITERATION
     fi
   done
@@ -56,18 +50,21 @@
 wrt_prepare() {                    #
 #----------------------------------#
   local ITERATION=$1
+  local      PREV=$2
 
   if [[ "$PROGNAME" = "clfs" ]] && [[ "$METHOD" = "boot" ]] ; then
     local PRUNEPATH="/jhalfs /sources /var/log/paco /opt /dev /home /mnt /proc \
 /root /sys /tmp /usr/src /lost+found /tools"
-    local ROOT_DIR=/
+    local    ROOT_DIR=/
     local DEST_TOPDIR=/jhalfs
+    local   ICALOGDIR=/jhalfs/logs/ICA
+    local FARCELOGDIR=/jhalfs/logs/farce
   else
     local PRUNEPATH="$BUILDDIR/jhalfs $BUILDDIR/sources $BUILDDIR/var/log/paco \
 $BUILDDIR/opt $BUILDDIR/dev $BUILDDIR/home $BUILDDIR/mnt \
 $BUILDDIR/proc $BUILDDIR/root $BUILDDIR/sys $BUILDDIR/tmp \
 $BUILDDIR/usr/src $BUILDDIR/lost+found $BUILDDIR/tools"
-    local ROOT_DIR=$BUILDDIR
+    local    ROOT_DIR=$BUILDDIR
     local DEST_TOPDIR=$BUILDDIR/jhalfs
   fi
 
@@ -79,6 +76,9 @@
 	extras/do_ica_prep $DEST_ICA/$ITERATION
 EOF
 ) >> $MKFILE
+    if [[ "$ITERATION" != "iteration-1" ]] ; then
+      wrt_do_ica_work "$PREV" "$ITERATION" "$DEST_ICA"
+    fi
   fi
 
   if [[ "$RUN_FARCE" = "1" ]] ; then
@@ -89,10 +89,30 @@
 	extras/filelist $DEST_FARCE/$ITERATION $DEST_FARCE/$ITERATION.filelist
 EOF
 ) >> $MKFILE
+    if [[ "$ITERATION" != "iteration-1" ]] ; then
+      wrt_do_farce_work "$PREV" "$ITERATION" "$DEST_FARCE"
+    fi
   fi
 }
 
 #----------------------------------#
+wrt_do_ica_work() {                #
+#----------------------------------#
+  echo -e "\t at extras/do_ica_work $1 $2 $ICALOGDIR $3" >> $MKFILE
+}
+
+#----------------------------------#
+wrt_do_farce_work() {                    #
+#----------------------------------#
+  local OUTPUT=$FARCELOGDIR/${1}_V_${2}
+  local PREDIR=$3/$1
+  local PREFILE=$3/$1.filelist
+  local ITEDIR=$3/$2
+  local ITEFILE=$3/$2.filelist
+  echo -e "\t at extras/farce --directory $OUTPUT $PREDIR $PREFILE $ITEDIR $ITEFILE" >> $MKFILE
+}
+
+#----------------------------------#
 wrt_logs_and_clean() {             #
 #----------------------------------#
   local ITERATION=$1
@@ -104,6 +124,8 @@
 	mv $system_rebuild $ITERATION && \\
 	popd
 	@rm -f $system_rebuild
+	@touch \$@
+
 EOF
 ) >> $MKFILE
 }
@@ -119,6 +141,8 @@
 	mkdir $ITERATION && \\
 	cp $system_rebuild $ITERATION && \\
 	popd
+	@touch \$@
+
 EOF
 ) >> $MKFILE
 }




More information about the alfs-log mailing list