[45f82718] | 1 | # $Id$
|
---|
| 2 |
|
---|
| 3 | #----------------------------------#
|
---|
| 4 | wrt_compare_targets() { #
|
---|
| 5 | #----------------------------------#
|
---|
| 6 |
|
---|
| 7 | for ((N=1; N <= ITERATIONS ; N++)) ; do # Double parentheses,
|
---|
| 8 | # and "ITERATIONS" with no "$".
|
---|
| 9 | ITERATION=iteration-$N
|
---|
| 10 | if [ "$N" != "1" ] ; then
|
---|
| 11 | wrt_system_build "$N" "$PREV_IT"
|
---|
| 12 | fi
|
---|
| 13 | this_script=$ITERATION
|
---|
[045b2dc] | 14 | CHROOT_wrt_target "$ITERATION" "$PREV"
|
---|
[45f82718] | 15 | wrt_compare_work "$ITERATION" "$PREV_IT"
|
---|
[6bb080e] | 16 | wrt_touch
|
---|
[45f82718] | 17 | PREV_IT=$ITERATION
|
---|
| 18 | PREV=$ITERATION
|
---|
| 19 | done
|
---|
| 20 | }
|
---|
| 21 |
|
---|
| 22 | #----------------------------------#
|
---|
| 23 | wrt_system_build() { #
|
---|
| 24 | #----------------------------------#
|
---|
| 25 | local RUN=$1
|
---|
| 26 | local PREV_IT=$2
|
---|
| 27 |
|
---|
| 28 | if [[ "$PROGNAME" = "clfs" ]] && [[ "$METHOD" = "chroot" ]] ; then
|
---|
[045b2dc] | 29 | chroot_final_system_Makefiles $RUN
|
---|
[45f82718] | 30 | elif [[ "$PROGNAME" = "clfs" ]] && [[ "$METHOD" = "boot" ]] ; then
|
---|
[045b2dc] | 31 | boot_final_system_Makefiles $RUN
|
---|
[45f82718] | 32 | else
|
---|
| 33 | chapter6_Makefiles $RUN
|
---|
| 34 | fi
|
---|
| 35 |
|
---|
[045b2dc] | 36 | if [[ "$PROGNAME" = "clfs" ]] ; then
|
---|
| 37 | basicsystem="$basicsystem $PREV_IT $system_build"
|
---|
| 38 | else
|
---|
| 39 | chapter6="$chapter6 $PREV_IT $system_build"
|
---|
| 40 | fi
|
---|
| 41 |
|
---|
| 42 | if [[ "$RUN" = "$ITERATIONS" ]] ; then
|
---|
| 43 | if [[ "$PROGNAME" = "clfs" ]] ; then
|
---|
| 44 | basicsystem="$basicsystem iteration-$RUN"
|
---|
| 45 | else
|
---|
| 46 | chapter6="$chapter6 iteration-$RUN"
|
---|
| 47 | fi
|
---|
| 48 | fi
|
---|
| 49 |
|
---|
[45f82718] | 50 | echo -e "\nsystem_build_$RUN: $PREV_IT $system_build" >> $MKFILE.tmp
|
---|
| 51 | }
|
---|
| 52 |
|
---|
| 53 | #----------------------------------#
|
---|
| 54 | wrt_compare_work() { #
|
---|
| 55 | #----------------------------------#
|
---|
| 56 | local ITERATION=$1
|
---|
| 57 | local PREV_IT=$2
|
---|
[1a1f099] | 58 | local PRUNEPATH="/dev /home /${SCRIPT_ROOT} /lost+found /media /mnt /opt /proc \
|
---|
[45f82718] | 59 | /sources /root /srv /sys /tmp /tools /usr/local /usr/src /var/log/paco"
|
---|
| 60 |
|
---|
[045b2dc] | 61 | local ROOT_DIR=/
|
---|
| 62 | local DEST_TOPDIR=/${SCRIPT_ROOT}
|
---|
| 63 | local ICALOGDIR=/${SCRIPT_ROOT}/logs/ICA
|
---|
| 64 | local FARCELOGDIR=/${SCRIPT_ROOT}/logs/farce
|
---|
[45f82718] | 65 |
|
---|
[401f81e] | 66 | if [[ "$RUN_ICA" = "y" ]] ; then
|
---|
[45f82718] | 67 | local DEST_ICA=$DEST_TOPDIR/ICA && \
|
---|
| 68 | (
|
---|
| 69 | cat << EOF
|
---|
[6bb080e] | 70 | @extras/do_copy_files "$PRUNEPATH" $ROOT_DIR $DEST_ICA/$ITERATION >>logs/\$@ 2>&1 && \\
|
---|
| 71 | extras/do_ica_prep $DEST_ICA/$ITERATION >>logs/\$@ 2>&1
|
---|
[45f82718] | 72 | EOF
|
---|
| 73 | ) >> $MKFILE.tmp
|
---|
| 74 | if [[ "$ITERATION" != "iteration-1" ]] ; then
|
---|
| 75 | wrt_do_ica_work "$PREV_IT" "$ITERATION" "$DEST_ICA"
|
---|
| 76 | fi
|
---|
| 77 | fi
|
---|
| 78 |
|
---|
[401f81e] | 79 | if [[ "$RUN_FARCE" = "y" ]] ; then
|
---|
[45f82718] | 80 | local DEST_FARCE=$DEST_TOPDIR/farce && \
|
---|
| 81 | (
|
---|
| 82 | cat << EOF
|
---|
[6bb080e] | 83 | @extras/do_copy_files "$PRUNEPATH" $ROOT_DIR $DEST_FARCE/$ITERATION >>logs/\$@ 2>&1 && \\
|
---|
| 84 | extras/filelist $DEST_FARCE/$ITERATION $DEST_FARCE/filelist-$ITERATION >>logs/\$@ 2>&1
|
---|
[45f82718] | 85 | EOF
|
---|
| 86 | ) >> $MKFILE.tmp
|
---|
| 87 | if [[ "$ITERATION" != "iteration-1" ]] ; then
|
---|
| 88 | wrt_do_farce_work "$PREV_IT" "$ITERATION" "$DEST_FARCE"
|
---|
| 89 | fi
|
---|
| 90 | fi
|
---|
| 91 | }
|
---|
| 92 |
|
---|
| 93 | #----------------------------------#
|
---|
| 94 | wrt_do_ica_work() { #
|
---|
| 95 | #----------------------------------#
|
---|
[6bb080e] | 96 | echo -e "\t@extras/do_ica_work $1 $2 $ICALOGDIR $3 >>logs/\$@ 2>&1" >> $MKFILE.tmp
|
---|
[45f82718] | 97 | }
|
---|
| 98 |
|
---|
| 99 | #----------------------------------#
|
---|
| 100 | wrt_do_farce_work() { #
|
---|
| 101 | #----------------------------------#
|
---|
| 102 | local OUTPUT=$FARCELOGDIR/${1}_V_${2}
|
---|
| 103 | local PREDIR=$3/$1
|
---|
| 104 | local PREFILE=$3/filelist-$1
|
---|
| 105 | local ITEDIR=$3/$2
|
---|
| 106 | local ITEFILE=$3/filelist-$2
|
---|
[6bb080e] | 107 | echo -e "\t@extras/farce --directory $OUTPUT $PREDIR $PREFILE $ITEDIR $ITEFILE >>logs/\$@ 2>&1" >> $MKFILE.tmp
|
---|
[45f82718] | 108 | }
|
---|