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.
[ $# -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"
case $stat in
M)
- msg "Locally modified: $file"
+ echo "Locally modified: $file"
[ "$force" ] || die "There are local modifications"
;;
done < $tempfile
-msg "Running autoreconf..."
+echo "Running autoreconf..."
autoreconf -I m4 || die "autoreconf error"
cd autogen
+echo "Checking status of generated files..."
bzr status -S $basegen >| $tempfile || \
die "bzr status error for generated files"
[ "$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