changeset 1358:9252453c40d0

Combine set_titlebar and "echo ===" stuff into announce() function. Consistently output target/stage info, and yank redundant instances.
author Rob Landley <rob@landley.net>
date Sun, 22 May 2011 04:18:30 -0500
parents a1dc80180a05
children 5536048765fb
files host-tools.sh linux-kernel.sh simple-cross-compiler.sh simple-root-filesystem.sh sources/download_functions.sh sources/functions.sh sources/utility_functions.sh system-image.sh
diffstat 8 files changed, 12 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- a/host-tools.sh	Sun May 22 04:13:54 2011 -0500
+++ b/host-tools.sh	Sun May 22 04:18:30 2011 -0500
@@ -26,8 +26,6 @@
 
 source sources/include.sh || exit 1
 
-echo "=== Building $STAGE_NAME"
-
 STAGE_DIR="${HOSTTOOLS}"
 
 # Blank $WORK but accept $STAGE_DIR if it exists.  Re-running this script
--- a/linux-kernel.sh	Sun May 22 04:13:54 2011 -0500
+++ b/linux-kernel.sh	Sun May 22 04:18:30 2011 -0500
@@ -8,7 +8,7 @@
 
 read_arch_dir "$1"
 
-# =================== build kernel ========================
+# If we have an initramfs, incorporate it into the kernel image.
 
 [ -e "$BUILD/root-image-$ARCH/initramfs_data.cpio" ] &&
   MORE_KERNEL_CONFIG="CONFIG_BLK_DEV_INITRD=y\nCONFIG_INITRAMFS_SOURCE=\"$BUILD/root-image-$ARCH/initramfs_data.cpio\"\nCONFIG_INITRAMFS_COMPRESSION_GZIP=y"
--- a/simple-cross-compiler.sh	Sun May 22 04:13:54 2011 -0500
+++ b/simple-cross-compiler.sh	Sun May 22 04:18:30 2011 -0500
@@ -22,10 +22,6 @@
 
 check_for_base_arch || exit 0
 
-# Ok, we have work to do.  Announce start of stage.
-
-echo "=== Building $STAGE_NAME"
-
 export TOOLCHAIN_PREFIX="${ARCH}-"
 
 # Build binutils, gcc, and ccwrap
--- a/simple-root-filesystem.sh	Sun May 22 04:13:54 2011 -0500
+++ b/simple-root-filesystem.sh	Sun May 22 04:18:30 2011 -0500
@@ -11,10 +11,6 @@
 check_for_base_arch || exit 0
 check_prerequisite "${ARCH}-cc"
 
-# Announce start of stage.
-
-echo "=== Building $STAGE_NAME"
-
 # Determine which directory layout we're using
 
 OLD_STAGE_DIR="$STAGE_DIR"
--- a/sources/download_functions.sh	Sun May 22 04:13:54 2011 -0500
+++ b/sources/download_functions.sh	Sun May 22 04:18:30 2011 -0500
@@ -61,8 +61,7 @@
 
   # Announce to the world that we're cracking open a new package
 
-  echo "=== $PACKAGE ($ARCH_NAME $STAGE_NAME)"
-  set_titlebar "$ARCH_NAME $STAGE_NAME $PACKAGE"
+  announce "$PACKAGE"
 
   # Find tarball, and determine type
 
--- a/sources/functions.sh	Sun May 22 04:13:54 2011 -0500
+++ b/sources/functions.sh	Sun May 22 04:18:30 2011 -0500
@@ -83,7 +83,7 @@
     . "$SOURCES/sections/$1".build
     cleanup
   else
-    echo "=== build section $1"
+    announce "$1"
     . "$SOURCES"/sections/"$1".sh
   fi
   CPUS=$OLDCPUS
@@ -335,7 +335,7 @@
 
     if [ -e "$BUILD/$STAGE_NAME-$ARCH" ]
     then
-      echo "=== Using existing ${STAGE_NAME}-$ARCH"
+      announce "Using existing ${STAGE_NAME}-$ARCH"
 
       return 1
     else
--- a/sources/utility_functions.sh	Sun May 22 04:13:54 2011 -0500
+++ b/sources/utility_functions.sh	Sun May 22 04:18:30 2011 -0500
@@ -93,12 +93,15 @@
   echo
 }
 
-# Set the title bar of the current xterm
+# Announce an action to the world
 
-set_titlebar()
+announce()
 {
-  [ -z "$NO_TITLE_BAR" ] &&
-    echo -en "\033]2;$1\007"
+  # Write a line to the log file with easily greppable header
+  echo "=== $1 ($ARCH_NAME $STAGE_NAME)"
+
+  # Set the title bar of the current xterm
+  [ -z "$NO_TITLE_BAR" ] && echo -en "\033]2;$ARCH_NAME $STAGE_NAME $1\007"
 }
 
 # Filter out unnecessary noise, keeping just lines starting with "==="
--- a/system-image.sh	Sun May 22 04:13:54 2011 -0500
+++ b/system-image.sh	Sun May 22 04:18:30 2011 -0500
@@ -76,4 +76,4 @@
 
 ARCH="$ARCH_NAME" create_stage_tarball
 
-echo "=== Packaging complete"
+announce "Packaging complete"