r3111 - in jhalfs/trunk: BLFS common

georgeb at linuxfromscratch.org georgeb at linuxfromscratch.org
Wed Sep 13 13:30:04 PDT 2006


Author: georgeb
Date: 2006-09-13 14:30:00 -0600 (Wed, 13 Sep 2006)
New Revision: 3111

Modified:
   jhalfs/trunk/BLFS/gen-makefile.sh
   jhalfs/trunk/common/common-functions
   jhalfs/trunk/common/progress_bar.sh
Log:
Applied Dan Nicholson's changes to progress_bar.sh and its support code

Modified: jhalfs/trunk/BLFS/gen-makefile.sh
===================================================================
--- jhalfs/trunk/BLFS/gen-makefile.sh	2006-09-13 20:04:46 UTC (rev 3110)
+++ jhalfs/trunk/BLFS/gen-makefile.sh	2006-09-13 20:30:00 UTC (rev 3111)
@@ -26,7 +26,7 @@
 
 $i:  $PREV
 	@\$(call echo_message, Building)
-	@./progress_bar.sh \$@ &
+	@./progress_bar.sh \$@ \$\$PPID &
 EOF
 ) >> $MKFILE.tmp
 }

Modified: jhalfs/trunk/common/common-functions
===================================================================
--- jhalfs/trunk/common/common-functions	2006-09-13 20:04:46 UTC (rev 3110)
+++ jhalfs/trunk/common/common-functions	2006-09-13 20:30:00 UTC (rev 3111)
@@ -44,7 +44,7 @@
 
 $i:  $PREV
 	@\$(call echo_message, Building)
-	@./progress_bar.sh \$@ &
+	@./progress_bar.sh \$@ \$\$PPID &
 	@echo -e "\n\`date\`\n\nKB: \`du -skx --exclude=${SCRIPT_ROOT} \$(MOUNT_PT)\`\n" >logs/$LOGFILE
 EOF
 ) >> $MKFILE.tmp
@@ -65,7 +65,7 @@
 
 $i:  $PREV
 	@\$(call echo_message, Building)
-	@./progress_bar.sh \$@ &
+	@./progress_bar.sh \$@ \$\$PPID &
 	@echo -e "\n\`date\`\n\nKB: \`du -skx --exclude=${SCRIPT_ROOT}\`\n" >logs/$LOGFILE
 EOF
 ) >> $MKFILE.tmp
@@ -367,7 +367,7 @@
 
 $i:  $PREV
 	@\$(call echo_message, Building)
-	@./progress_bar.sh \$@ &
+	@./progress_bar.sh \$@ \$\$PPID &
 	@echo -e "\n\`date\`\n\nKB: \`du -skx --exclude=${SCRIPT_ROOT} \$(MOUNT_PT)\`\n" >logs/$LOGFILE
 EOF
 ) >> $MKFILE.tmp
@@ -387,7 +387,7 @@
 
 $i:  $PREV
 	@\$(call echo_message, Building)
-	@./progress_bar.sh \$@ &
+	@./progress_bar.sh \$@ \$\$PPID &
 	@echo -e "\n\`date\`\n\nKB: \`du -skx --exclude=${SCRIPT_ROOT}\`\n" >logs/$LOGFILE
 EOF
 ) >> $MKFILE.tmp

Modified: jhalfs/trunk/common/progress_bar.sh
===================================================================
--- jhalfs/trunk/common/progress_bar.sh	2006-09-13 20:04:46 UTC (rev 3110)
+++ jhalfs/trunk/common/progress_bar.sh	2006-09-13 20:30:00 UTC (rev 3111)
@@ -7,6 +7,7 @@
 # Be sure that we know the taget name
 [[ -z $1 ]] && exit
 TARGET=$1  # Remember the target build we are looking for
+MAKE_PPID=$2
 
 declare -r  CSI=$'\e['  # DEC terminology, Control Sequence Introducer
 declare -r  CURSOR_OFF=${CSI}$'?25l'
@@ -21,12 +22,9 @@
 declare -i  SEC=0  # Seconds accumulator
 declare -i  PREV_SEC=0
 
-makePID=$(fuser -v . 2>&1 | grep make)
-makePID=$(echo $makePID | cut -d" " -f2)
-
 write_or_exit() {
     # make has been killed or failed or run to completion, leave
-  [[ ! -e /proc/$makePID ]] && echo -n "${CURSOR_ON}" && exit
+  [[ ! -e /proc/${MAKE_PPID} ]] && echo -n "${CURSOR_ON}" && exit
 
     # Target build complete, leave.
   [[ -f ${TARGET} ]] && echo -n "${CURSOR_ON}" && exit




More information about the alfs-log mailing list