diff --git a/LFS/master.sh b/LFS/master.sh index 2f3edfd..a6cfec3 100755 --- a/LFS/master.sh +++ b/LFS/master.sh @@ -399,13 +399,7 @@ EOF ) >> $MKFILE # Add the ICA targets - [[ "$RUN_ICA" != "0" ]] && \ -( - cat << EOF -ICA_rebuild: $ICA_rebuild - -EOF -) >> $MKFILE + [[ "$RUN_ICA" != "0" ]] && wrt_ica_targets "$ICA_rebuild" # Bring over the items from the Makefile.tmp cat $MKFILE.tmp >> $MKFILE diff --git a/common/func_ICA.sh b/common/func_ICA.sh index c648517..6c5ae36 100644 --- a/common/func_ICA.sh +++ b/common/func_ICA.sh @@ -1,9 +1,21 @@ # $Id$ +#----------------------------------# +wrt_ica_targets() { # +#----------------------------------# + local ICA_rebuild=$1 +( + cat << EOF +ICA_rebuild: $ICA_rebuild + +EOF +) >> $MKFILE +} + # Acknowledgment: # The following code is a modified version of an original work written by -# Greg Schafer for the "DIY Linux" project and is included here with his -# permission. +# Greg Schafer for the "DIY Linux" project and is included here with his +# permission. # ref: http://www.diy-linux.org # # @@ -32,15 +44,15 @@ do_ica_prep() { # #----------------------------------# : < 0 ]] && echo " $COMMON_DIR/common-functions did not load.." && exit [[ $VERBOSITY > 0 ]] && echo "OK" # - [[ $VERBOSITY > 0 ]] && echo -n "Loading masterscript conf..." source $COMMON_DIR/config [[ $? > 0 ]] && echo "$COMMON_DIR/conf did not load.." && exit [[ $VERBOSITY > 0 ]] && echo "OK" # +[[ $VERBOSITY > 0 ]] && echo -n "Loading ICA module..." +source $COMMON_DIR/func_ICA.sh +[[ $? > 0 ]] && echo "$COMMON_DIR/func_ICA.sh did not load.." && exit +[[ $VERBOSITY > 0 ]] && echo "OK" +# [[ $VERBOSITY > 0 ]] && echo -n "Loading config module <$MODULE_CONFIG>..." source $MODULE_CONFIG [[ $? > 0 ]] && echo "$MODULE_CONFIG did not load.." && exit 1