Changeset 9199a13 for common


Ignore:
Timestamp:
06/10/2006 04:48:25 PM (18 years ago)
Author:
Manuel Canales Esparcia <manuel@…>
Branches:
experimental
Children:
966cb20
Parents:
e35e794
Message:

Merged r2754:2768 from trunk.

Location:
common
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • common/common-functions

    re35e794 r9199a13  
    219219        [[ -n \$\$ROOT ]] && \\
    220220        rm -rf \$(MOUNT_PT)\$(SRC)/\$\$ROOT && \\
    221         if [ -e \$(MOUNT_PT)\$(SRC)/${PKG_NAME%%-*}-build ]; then \\
    222                 rm -rf \$(MOUNT_PT)\$(SRC)/${PKG_NAME%%-*}-build; \\
     221        if [ -e \$(MOUNT_PT)\$(SRC)/${PKG_NAME%-*}-build ]; then \\
     222                rm -rf \$(MOUNT_PT)\$(SRC)/${PKG_NAME%-*}-build; \\
    223223        fi;
    224224EOF
     
    236236        [[ -n \$\$ROOT ]] && \\
    237237        rm -rf \$(SRC)/\$\$ROOT && \\
    238         if [ -e \$(SRC)/${PKG_NAME%%-*}-build ]; then \\
    239                 rm -rf \$(SRC)/${PKG_NAME%%-*}-build; \\
     238        if [ -e \$(SRC)/${PKG_NAME%-*}-build ]; then \\
     239                rm -rf \$(SRC)/${PKG_NAME%-*}-build; \\
    240240        fi;
    241241EOF
     
    460460                rm -r \$(SRC)/$name-build; \\
    461461        fi;
     462EOF
     463) >> $MKFILE.tmp
     464}
     465
     466
     467#----------------------------------#
     468wrt_touch() {                      #
     469#----------------------------------#
     470(
     471cat << EOF
     472        @touch  \$@ && \\
     473        sleep .25 && \\
     474        echo -e "\n\n "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
     475        echo --------------------------------------------------------------------------------\$(WHITE)
    462476EOF
    463477) >> $MKFILE.tmp
  • common/func_compare.sh

    re35e794 r9199a13  
    102102
    103103#----------------------------------#
    104 wrt_logs() {             #
     104wrt_logs() {                       #
    105105#----------------------------------#
    106106  local ITERATION=iteration-$1
     
    112112        mv ${LOGS} $ITERATION && \\
    113113        popd 1> /dev/null
    114         @touch \$@
     114        @touch \$@ && \\
     115        echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
     116        echo --------------------------------------------------------------------------------\$(WHITE)
    115117EOF
    116118) >> $MKFILE.tmp
  • common/makefile-functions

    re35e794 r9199a13  
    1313  @echo --------------------------------------------------------------------------------
    1414  @echo $(BOLD)$(1) target $(BLUE)$@$(BOLD)
    15   @echo --------------------------------------------------------------------------------$(WHITE)
     15  @echo $(WHITE)
    1616endef
    1717
     
    5757  @echo -e \\texcept if building CLFS with METHOO=boot.
    5858  @echo
    59   @echo -e \\t- Set a password for the root user
     59  @echo -e \\t- Set a password for the root user.
    6060  @echo
    6161  @echo -e \\t- Edit /etc/fstab, /etc/hosts, /etc/sysconfig/clock,
     
    6464  @echo -e \\tany other configuration file required to suit your needs.
    6565  @echo
    66   @echo -e \\t- Set-up the boot loader. See the relevant book section.
     66  @echo -e \\t- Exit from the chroot.
    6767  @echo
    68   @echo -e \\t- Unmount the filesystems.
     68  @echo -e \\t- Set-up the boot loader, except if building CLFS with METHOO=boot.
     69  @echo -e \\tYou can set-up the host bootloader or the new boot-loader
     70  @echo -e \\tinstalled on the new system.
     71  @echo -e \\tIf the last, you must to mount the virtual filesystems, re-enter
     72  @echo -e \\tto the chroot and be sure that /dev is populated with the
     73  @echo -e \\trequired devices before configure the boot-loader. When ready,
     74  @echo -e \\texit from the chroot and umount the filesystems
    6975  @echo
    7076  @echo If you are an experienced LFS user, several of those steps can be
  • common/progress_bar.sh

    re35e794 r9199a13  
    55set -e
    66
     7# Be sure that we know the taget name
    78[[ -z $1 ]] && exit
     9TARGET=$1  # Remember the target build we are looking for
    810
    9 if [ ! -f $1 ] ; then
    10   while fuser -v . 2>&1 | grep make >/dev/null ; do
    11     echo -n "."
    12     sleep 1
    13     [[ -f $1 ]] && exit
    14   done
    15 fi
     11declare -r  CSI=$'\e['  # DEC terminology, Control Sequence Introducer
     12declare -r  CURSOR_OFF=${CSI}$'?25l'
     13declare -r  CURSOR_ON=${CSI}$'?25h'
     14declare -r  ERASE_LINE=${CSI}$'2K'
     15declare -r  FRAME_OPEN=${CSI}$'2G['
     16declare -r  FRAME_CLOSE=${CSI}$'63G]'
     17declare -r  TS_POSITION=${CSI}$'65G'
     18declare -a  RESET_LINE=${CURSOR_OFF}${ERASE_LINE}${FRAME_OPEN}${FRAME_CLOSE}
     19
     20declare -a  GRAPHIC_STR="| / - \\ + "
     21declare -i  SEC=0  # Seconds accumulator
     22declare -i  PREV_SEC=0
     23
     24
     25write_or_exit() {
     26    # make has been killed or failed or run to completion, leave
     27  if ! fuser -v . 2>&1 | grep make >/dev/null ; then
     28     echo -n "${CURSOR_ON}" && exit
     29  fi
     30    # Target build complete, leave.
     31  [[ -f ${TARGET} ]] && echo -n "${CURSOR_ON}" && exit
     32    # It is safe to write to the screen
     33  echo -n "$1"
     34}
     35
     36  # initialize screen
     37write_or_exit "${RESET_LINE}${TS_POSITION}0 min. 0 sec. "
     38
     39  # loop forever..
     40while true ; do
     41
     42      # Loop through the animation string
     43    for GRAPHIC_CHAR in ${GRAPHIC_STR} ; do
     44      write_or_exit "${CSI}$((SEC + 3))G${GRAPHIC_CHAR}"
     45      sleep .12 # This value MUST be less than .2 seconds.
     46    done
     47
     48      # A BASH internal variable, the number of seconds the script
     49      # has been running. modulo convert to 0-59
     50    SEC=$(($SECONDS % 60))
     51
     52      # Detect rollover of the seconds.
     53    (( PREV_SEC > SEC )) && write_or_exit "${RESET_LINE}"
     54    (( PREV_SEC = SEC ))
     55
     56      # Display the accumulated time. div minutes.. modulo seconds.
     57    write_or_exit "${TS_POSITION}$(($SECONDS / 60)) min. $SEC sec. "
     58done
     59
     60exit
Note: See TracChangeset for help on using the changeset viewer.