Changeset a0f0bee for master.sh


Ignore:
Timestamp:
05/14/2006 11:35:23 PM (18 years ago)
Author:
George Boudreau <georgeb@…>
Branches:
1.0, 2.3, 2.3.x, 2.4, ablfs, ablfs-more, legacy, new_features, trunk
Children:
0596057
Parents:
5a733a4
Message:

Do some housekeeping in ./master.sh

File:
1 edited

Legend:

Unmodified
Added
Removed
  • master.sh

    r5a733a4 ra0f0bee  
    447447validate_config
    448448echo "${SD_BORDER}${nl_}"
    449 
    450449echo -n "Are you happy with these settings? yes/no (no): "
    451450read ANSWER
     
    456455echo "${nl_}${SD_BORDER}${nl_}"
    457456
    458 # Loadd additional modules or configuration files based on global settings
     457# Load additional modules or configuration files based on global settings
    459458# compare module
    460459if [[ "$COMPARE" = "1" ]]; then
     
    471470  [[ $? > 0 ]] && echo " optimize/optimize_functions did not load.." && exit
    472471  [[ $VERBOSITY > 0 ]] && echo "OK"
    473 fi
    474 #
    475 # optimize configurations
    476 if [[ "$OPTIMIZE" != "0" ]]; then
     472  #
     473  # optimize configurations
    477474  [[ $VERBOSITY > 0 ]] && echo -n "Loading optimization config..."
    478475  source optimize/opt_config
    479476  [[ $? > 0 ]] && echo " optimize/opt_config did not load.." && exit
    480477  [[ $VERBOSITY > 0 ]] && echo "OK"
    481 fi
    482 #
    483 
    484 # Validate optimize settings, if required
    485 [[ "$OPTIMIZE" != "0" ]] && validate_opt_settings
    486 
    487 # Prevents setting "-d /" by mistake.
    488 
    489 if [ $BUILDDIR = / ] ; then
    490   echo -ne "\nThe root directory can't be used to build LFS.\n\n"
    491   exit 1
    492 fi
     478  # Validate optimize settings, if required
     479  validate_opt_settings
     480fi
     481#
    493482
    494483# If $BUILDDIR has subdirectories like tools/ or bin/, stop the run
    495484# and notify the user about that.
    496 
    497485if [ -d $BUILDDIR/tools -o -d $BUILDDIR/bin ] && [ -z $CLEAN ] ; then
    498486  eval "$no_empty_builddir"
     
    505493  mkdir -p $JHALFSDIR
    506494fi
    507 
     495#
     496# Create $BUILDDIR/sources even though it could be created by get_sources()
     497if [[ ! -d $BUILDDIR/sources ]]; then
     498  mkdir -p $BUILDDIR/sources
     499fi
     500#
     501# Create the log directory
     502if [[ ! -d $LOGDIR ]]; then
     503  mkdir $LOGDIR
     504fi
     505>$LOGDIR/$LOG
     506#
     507#
    508508if [[ "$PWD" != "$JHALFSDIR" ]]; then
    509509  cp $COMMON_DIR/makefile-functions $JHALFSDIR/
     
    513513    cp extras/* $JHALFSDIR/extras
    514514  fi
     515  #
    515516  if [[ -n "$FILES" ]]; then
    516517    # pushd/popd necessary to deal with mulitiple files
     
    519520    popd 1> /dev/null
    520521  fi
     522  #
    521523  if [[ "$PROGNAME" != "blfs" ]]; then
    522     [[ "$REPORT" = "1" ]] && cp $COMMON_DIR/create-sbu_du-report.sh  $JHALFSDIR/
     524    if [[ "$REPORT" = "1" ]]; then
     525      cp $COMMON_DIR/create-sbu_du-report.sh  $JHALFSDIR/
     526      # After be sure that all look sane and if REPORT=1, dump the settings to a file
     527      # This file will be used to create the REPORT header
     528      validate_config > $JHALFSDIR/jhalfs.config
     529    fi     
    523530    [[ "$GETPKG" = "1" ]] && cp $COMMON_DIR/urls.xsl  $JHALFSDIR/
    524531  fi
     532  #
    525533  sed 's,FAKEDIR,'$BOOK',' $PACKAGE_DIR/$XSL > $JHALFSDIR/${XSL}
    526534  export XSL=$JHALFSDIR/${XSL}
    527535fi
    528536
    529 if [[ ! -d $LOGDIR ]]; then
    530   mkdir $LOGDIR
    531 fi
    532 
    533 # After be sure that all look sane and if REPORT=1, dump the settings to a file
    534 # This file will be used to create the REPORT header
    535 [[ "$PROGNAME" != "blfs" ]] && [[ "$REPORT" = "1" ]] && validate_config > $JHALFSDIR/jhalfs.config
    536 
    537 >$LOGDIR/$LOG
    538537
    539538get_book
    540539echo "${SD_BORDER}${nl_}"
    541540
    542 # If $BUILDDIR/sources hasn't been created yet at this point, create it.
    543 [[ ! -d $BUILDDIR/sources ]] && mkdir $BUILDDIR/sources
    544541
    545542build_Makefile
Note: See TracChangeset for help on using the changeset viewer.