From: Glenn Morris <rgm@gnu.org>
Date: Wed, 23 Mar 2011 07:58:05 +0000 (-0700)
Subject: * autogen/update_autogen (msg): Remove function; use `exec' instead.
X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~504
X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=904a432cf44c176fa3c88a975f046d0cf2992023;p=emacs.git

* autogen/update_autogen (msg): Remove function; use `exec' instead.
---

diff --git a/ChangeLog b/ChangeLog
index 5711f59dd67..5b953d4a87f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 2011-03-23  Glenn Morris  <rgm@gnu.org>
 
 	* autogen/update_autogen: Fix typo.
+	(msg): Remove function; use `exec' instead.
 
 	* Makefile.in (mkdir): Use `install-sh -d' instead of mkinstalldirs.
 	(sync-from-gnulib): Don't sync mkinstalldirs.
diff --git a/autogen/update_autogen b/autogen/update_autogen
index f655404a72c..de525a9f4a2 100755
--- a/autogen/update_autogen
+++ b/autogen/update_autogen
@@ -104,14 +104,10 @@ OPTIND=1
 [ $# -eq 0 ] || die "Wrong number of arguments"
 
 
-function msg ()
-{
-    [ "$quiet" ] && return 0
-    echo "$@"
-}                               # function msg
+[ "$quiet" ] && exec 1> /dev/null
 
 
-msg "Running bzr status..."
+echo "Running bzr status..."
 
 bzr status -S $sources >| $tempfile || die "bzr status error for sources"
 
@@ -119,7 +115,7 @@ while read stat file; do
 
     case $stat in
         M)
-            msg "Locally modified: $file"
+            echo "Locally modified: $file"
             [ "$force" ] || die "There are local modifications"
             ;;
 
@@ -128,7 +124,7 @@ while read stat file; do
 done < $tempfile
 
 
-msg "Running autoreconf..."
+echo "Running autoreconf..."
 
 autoreconf -I m4 || die "autoreconf error"
 
@@ -138,6 +134,7 @@ cp $genfiles autogen/
 
 cd autogen
 
+echo "Checking status of generated files..."
 
 bzr status -S $basegen >| $tempfile || \
     die "bzr status error for generated files"
@@ -155,28 +152,25 @@ done < $tempfile
 
 
 [ "$modified" ] || {
-    msg "No files were modified"
+    echo "No files were modified"
     exit 0
 }
 
-msg "Modified file(s): $modified"
+echo "Modified file(s): $modified"
 
 [ "$commit" ] || exit 0
 
 
-msg "Committing..."
+echo "Committing..."
 
 ## bzr status output is annoyingly always relative to top-level, not PWD.
 cd ../
 
-opt=
-[ "$quiet" ] && opt=-q
-
-bzr commit $opt -m "Auto-commit of generated files." $modified || \
+bzr commit -m "Auto-commit of generated files." $modified || \
     die "bzr commit error"
 
 
-msg "Committed files: $modified"
+echo "Committed files: $modified"
 
 exit