source: common/func_compare.sh@ d80021c3

experimental
Last change on this file since d80021c3 was d80021c3, checked in by Manuel Canales Esparcia <manuel@…>, 19 years ago

Creating raw system_build_N packages targets.

  • Property mode set to 100644
File size: 3.0 KB
RevLine 
[1b9148c]1# $Id$
2
[a5fa1a9]3#----------------------------------#
[d27c9ca]4wrt_compare_targets() { #
[bfbd927]5#----------------------------------#
6
7 for ((N=1; N <= ITERATIONS ; N++)) ; do # Double parentheses,
8 # and "ITERATIONS" with no "$".
[6794fe4]9 ITERATION=iteration-$N
[d27c9ca]10 if [ "$N" != "1" ] ; then
11 wrt_system_build "$N"
[6794fe4]12 fi
[d27c9ca]13 wrt_target "$ITERATION" "$PREV"
14 wrt_compare_work "$ITERATION" "$PREV_IT"
15 wrt_logs "$N"
16 PREV_IT=$ITERATION
[eb024db]17 PREV=$ITERATION
[6794fe4]18 done
19}
20
21#----------------------------------#
[eb024db]22wrt_system_build() { #
23#----------------------------------#
24 local RUN=$1
25
[d6614ab]26 echo "system_build_$N: $PREV $chapter6" >> $MKFILE.tmp
[d80021c3]27
28 if [[ "$PROGNAME" = "clfs" ]] && [[ "$METHOD" = "chroot" ]] ; then
29 final_system_Makefiles $RUN
30 elif [[ "$PROGNAME" = "clfs" ]] && [[ "$METHOD" = "boot" ]] ; then
31 bm_final_system_Makefiles $RUN
32 else
33 chapter6_Makefiles $RUN
34 fi
35
[eb024db]36}
37
38#----------------------------------#
[d27c9ca]39wrt_compare_work() { #
[6794fe4]40#----------------------------------#
41 local ITERATION=$1
[d27c9ca]42 local PREV_IT=$2
[5112239]43 local PRUNEPATH="/dev /home /jhalfs /lost+found /media /mnt /opt /proc \
44/sources /root /srv /sys /tmp /tools /usr/local /usr/src /var/log/paco"
[6794fe4]45
[aab6e73]46 if [[ "$PROGNAME" = "clfs" ]] && [[ "$METHOD" = "boot" ]] ; then
[8ba8df4]47 local ROOT_DIR=/
[6794fe4]48 local DEST_TOPDIR=/jhalfs
[8ba8df4]49 local ICALOGDIR=/jhalfs/logs/ICA
50 local FARCELOGDIR=/jhalfs/logs/farce
[6794fe4]51 else
[8ba8df4]52 local ROOT_DIR=$BUILDDIR
[6794fe4]53 local DEST_TOPDIR=$BUILDDIR/jhalfs
54 fi
55
56 if [[ "$RUN_ICA" = "1" ]] ; then
57 local DEST_ICA=$DEST_TOPDIR/ICA && \
[bfbd927]58(
59 cat << EOF
[685e4fc]60 @extras/do_copy_files "$PRUNEPATH" $ROOT_DIR $DEST_ICA/$ITERATION && \\
[6794fe4]61 extras/do_ica_prep $DEST_ICA/$ITERATION
[bfbd927]62EOF
[d27c9ca]63) >> $MKFILE.tmp
[8ba8df4]64 if [[ "$ITERATION" != "iteration-1" ]] ; then
[d27c9ca]65 wrt_do_ica_work "$PREV_IT" "$ITERATION" "$DEST_ICA"
[8ba8df4]66 fi
[6794fe4]67 fi
68
69 if [[ "$RUN_FARCE" = "1" ]] ; then
70 local DEST_FARCE=$DEST_TOPDIR/farce && \
[bfbd927]71(
72 cat << EOF
[685e4fc]73 @extras/do_copy_files "$PRUNEPATH" $ROOT_DIR $DEST_FARCE/$ITERATION && \\
[6794fe4]74 extras/filelist $DEST_FARCE/$ITERATION $DEST_FARCE/$ITERATION.filelist
[bfbd927]75EOF
[d27c9ca]76) >> $MKFILE.tmp
[8ba8df4]77 if [[ "$ITERATION" != "iteration-1" ]] ; then
[d27c9ca]78 wrt_do_farce_work "$PREV_IT" "$ITERATION" "$DEST_FARCE"
[8ba8df4]79 fi
[6794fe4]80 fi
81}
82
[8ba8df4]83#----------------------------------#
84wrt_do_ica_work() { #
85#----------------------------------#
[d27c9ca]86 echo -e "\t@extras/do_ica_work $1 $2 $ICALOGDIR $3" >> $MKFILE.tmp
[8ba8df4]87}
88
89#----------------------------------#
[d27c9ca]90wrt_do_farce_work() { #
[8ba8df4]91#----------------------------------#
92 local OUTPUT=$FARCELOGDIR/${1}_V_${2}
93 local PREDIR=$3/$1
94 local PREFILE=$3/$1.filelist
95 local ITEDIR=$3/$2
96 local ITEFILE=$3/$2.filelist
[d27c9ca]97 echo -e "\t@extras/farce --directory $OUTPUT $PREDIR $PREFILE $ITEDIR $ITEFILE" >> $MKFILE.tmp
[6794fe4]98}
[bfbd927]99
[6794fe4]100#----------------------------------#
101wrt_logs() { #
102#----------------------------------#
[d27c9ca]103 local ITERATION=iteration$1
[6794fe4]104
105(
106 cat << EOF
107 @pushd logs && \\
108 mkdir $ITERATION && \\
[d27c9ca]109 cp ${chapter6}-$N $ITERATION && \\
[6794fe4]110 popd
[8ba8df4]111 @touch \$@
112
[bfbd927]113EOF
[d27c9ca]114) >> $MKFILE.tmp
[bfbd927]115}
Note: See TracBrowser for help on using the repository browser.