- Timestamp:
- 06/10/2006 04:48:25 PM (18 years ago)
- Branches:
- experimental
- Children:
- 966cb20
- Parents:
- e35e794
- Location:
- common
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
common/common-functions
re35e794 r9199a13 219 219 [[ -n \$\$ROOT ]] && \\ 220 220 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; \\ 223 223 fi; 224 224 EOF … … 236 236 [[ -n \$\$ROOT ]] && \\ 237 237 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; \\ 240 240 fi; 241 241 EOF … … 460 460 rm -r \$(SRC)/$name-build; \\ 461 461 fi; 462 EOF 463 ) >> $MKFILE.tmp 464 } 465 466 467 #----------------------------------# 468 wrt_touch() { # 469 #----------------------------------# 470 ( 471 cat << EOF 472 @touch \$@ && \\ 473 sleep .25 && \\ 474 echo -e "\n\n "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\ 475 echo --------------------------------------------------------------------------------\$(WHITE) 462 476 EOF 463 477 ) >> $MKFILE.tmp -
common/func_compare.sh
re35e794 r9199a13 102 102 103 103 #----------------------------------# 104 wrt_logs() { #104 wrt_logs() { # 105 105 #----------------------------------# 106 106 local ITERATION=iteration-$1 … … 112 112 mv ${LOGS} $ITERATION && \\ 113 113 popd 1> /dev/null 114 @touch \$@ 114 @touch \$@ && \\ 115 echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\ 116 echo --------------------------------------------------------------------------------\$(WHITE) 115 117 EOF 116 118 ) >> $MKFILE.tmp -
common/makefile-functions
re35e794 r9199a13 13 13 @echo -------------------------------------------------------------------------------- 14 14 @echo $(BOLD)$(1) target $(BLUE)$@$(BOLD) 15 @echo --------------------------------------------------------------------------------$(WHITE)15 @echo $(WHITE) 16 16 endef 17 17 … … 57 57 @echo -e \\texcept if building CLFS with METHOO=boot. 58 58 @echo 59 @echo -e \\t- Set a password for the root user 59 @echo -e \\t- Set a password for the root user. 60 60 @echo 61 61 @echo -e \\t- Edit /etc/fstab, /etc/hosts, /etc/sysconfig/clock, … … 64 64 @echo -e \\tany other configuration file required to suit your needs. 65 65 @echo 66 @echo -e \\t- Set-up the boot loader. See the relevant book section.66 @echo -e \\t- Exit from the chroot. 67 67 @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 69 75 @echo 70 76 @echo If you are an experienced LFS user, several of those steps can be -
common/progress_bar.sh
re35e794 r9199a13 5 5 set -e 6 6 7 # Be sure that we know the taget name 7 8 [[ -z $1 ]] && exit 9 TARGET=$1 # Remember the target build we are looking for 8 10 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 11 declare -r CSI=$'\e[' # DEC terminology, Control Sequence Introducer 12 declare -r CURSOR_OFF=${CSI}$'?25l' 13 declare -r CURSOR_ON=${CSI}$'?25h' 14 declare -r ERASE_LINE=${CSI}$'2K' 15 declare -r FRAME_OPEN=${CSI}$'2G[' 16 declare -r FRAME_CLOSE=${CSI}$'63G]' 17 declare -r TS_POSITION=${CSI}$'65G' 18 declare -a RESET_LINE=${CURSOR_OFF}${ERASE_LINE}${FRAME_OPEN}${FRAME_CLOSE} 19 20 declare -a GRAPHIC_STR="| / - \\ + " 21 declare -i SEC=0 # Seconds accumulator 22 declare -i PREV_SEC=0 23 24 25 write_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 37 write_or_exit "${RESET_LINE}${TS_POSITION}0 min. 0 sec. " 38 39 # loop forever.. 40 while 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. " 58 done 59 60 exit
Note:
See TracChangeset
for help on using the changeset viewer.