Changeset 6e31ef7


Ignore:
Timestamp:
10/12/2005 10:07:29 AM (19 years ago)
Author:
Manuel Canales Esparcia <manuel@…>
Branches:
0.2, 1.0, 2.3, 2.3.x, 2.4, ablfs, ablfs-more, legacy, new_features, trunk
Children:
2a54650
Parents:
f0f60d0
Message:

Added some command-line sanity checks.
Started support for timezone setting.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • jhalfs

    rf0f60d0 r6e31ef7  
    3838                                disables also the build of TCL, Expect
    3939                                and DejaGNU
    40 
    41   --page_size PAGE              set PAGE as the default page size (letter,
    42                                 A4, or others). This setting is required to
     40                               
     41  --timezone TIMEZONE           set TIMEZONE as the local timezone. If not
     42                                specified, Europe/London will be used.
     43
     44  --page_size PAGE              set PAGE as the default page size (letter
     45                                or A4). This setting is required to
    4346                                build Groff. If not specified, \"letter\"
    4447                                will be used.
     
    108111      test $# = 1 && eval "$exit_missing_arg"
    109112      shift
     113      if [ -f $1/patches.ent ] ; then
    110114      WC=1
    111115      BOOK=$1
     116      else
     117        echo -e "\nLook like $1 isn't a supported working copy."
     118        echo -e "Verify your selection and the command line.\n"
     119        exit 1
     120      fi
    112121      shift
    113122      ;;
     
    131140      test $# = 1 && eval "$exit_missing_arg"
    132141      shift
    133       PAGE=$1
     142      case $1 in
     143        letter | A4 )
     144          PAGE=$1
     145          ;;
     146        * )
     147          echo "$1 isn't a supported page size."
     148          exit 1
     149          ;;
     150      esac
    134151      shift
    135152      ;;
     
    137154    --no-toolchain-test )
    138155      TOOLCHAINTEST=0
     156      shift
     157      ;;
     158
     159    --timezone | -C )
     160      test $# = 1 && eval "$exit_missing_arg"
     161      shift
     162      if [ -f /usr/share/zoneinfo/$1 ] ; then
     163        TIMEZONE=$1
     164      else
     165        echo -e "\nLook like $1 isn't a valid timezone description."
     166        echo -e "Verify your selection and the command line.\n"
     167        exit 1
     168      fi
    139169      shift
    140170      ;;
     
    146176        CONFIG=$1
    147177      else
    148         echo -e "\nFile $1 not found, Skipping kernel build.\n"
     178        echo -e "\nFile $1 not found. Verify your command line.\n"
     179        exit 1
    149180      fi
    150181      shift
     
    189220if [ -z $TOOLCHAINTEST ] ; then TOOLCHAINTEST=1 ; fi
    190221if [ -z $PAGE ] ; then PAGE=letter ; fi
     222if [ -z $TIMEZONE ] ; then TIMEZONE=Europe/London ; fi
    191223
    192224HEADER="# This file is automatically generated by jhalfs
     
    822854        echo "PATH=/tools/bin:/bin:/usr/bin" >> /home/lfs/.bashrc && \\
    823855        echo "export LFS LC_ALL PATH" >> /home/lfs/.bashrc && \\
    824         echo ". $JHALFSDIR/envars" >> /home/lfs/.bashrc && \\
     856        echo "source $JHALFSDIR/envars" >> /home/lfs/.bashrc && \\
    825857        chown lfs:lfs /home/lfs/.bash* && \\
    826858        touch envars && \\
     
    848880
    849881if [ ! -d $JHALFSDIR ] ; then
    850   mkdir -p $JHALFSDIR
     882  mkdir -pv $JHALFSDIR
    851883fi
    852884
    853885if [ ! -d $LOGDIR ] ; then
    854   mkdir $LOGDIR
     886  mkdir -v $LOGDIR
    855887fi
    856888
     
    858890
    859891if [ "$PWD" != "$JHALFSDIR" ] ; then
    860   cp $0 $XSL $FNC $JHALFSDIR/
     892  cp -v $0 $XSL $FNC $JHALFSDIR/
    861893fi
    862894
Note: See TracChangeset for help on using the changeset viewer.