[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r116015: * admin/update_autogen (status): New functi
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] trunk r116015: * admin/update_autogen (status): New function. Use throughout. |
Date: |
Mon, 13 Jan 2014 21:17:21 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 116015
revision-id: address@hidden
parent: address@hidden
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Mon 2014-01-13 16:17:18 -0500
message:
* admin/update_autogen (status): New function. Use throughout.
modified:
admin/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-2226
admin/update_autogen
update_autogen-20110320234513-evoa2jhg3q7dkdg8-8
=== modified file 'admin/ChangeLog'
--- a/admin/ChangeLog 2014-01-10 18:59:54 +0000
+++ b/admin/ChangeLog 2014-01-13 21:17:18 +0000
@@ -1,3 +1,7 @@
+2014-01-13 Glenn Morris <address@hidden>
+
+ * update_autogen (status): New function. Use throughout.
+
2014-01-10 Glenn Morris <address@hidden>
* update_autogen: Fix sed bug that was losing the last AUTOGEN_VCS.
=== modified file 'admin/update_autogen'
--- a/admin/update_autogen 2014-01-10 18:59:54 +0000
+++ b/admin/update_autogen 2014-01-13 21:17:18 +0000
@@ -140,24 +140,36 @@
[ "$quiet" ] && exec 1> /dev/null
-echo "Running bzr status..."
-
-bzr status -S ${autogendir:+$sources} ${ldefs_flag:+lisp} \
- ${info_flag:+doc} >| $tempfile || \
- die "bzr status error for input files"
+## Run status on inputs, list modified files on stdout.
+status ()
+{
+ bzr status -S "$@" >| $tempfile || die "bzr status error for $@"
+
+ local stat file modified
+
+ while read stat file; do
+
+ [ "$stat" != "M" ] && \
+ die "Unexpected status ($stat) for generated $file"
+ modified="$modified $file"
+
+ done < $tempfile
+
+ echo "$modified"
+
+ return 0
+} # function status
+
+
+echo "Checking input file status..."
## The lisp portion could be more permissive, eg only care about .el files.
-while read stat file; do
-
- case $stat in
- M)
- echo "Locally modified: $file"
- [ "$force" ] || die "There are local modifications"
- ;;
-
- *) die "Unexpected status ($stat) for $file" ;;
- esac
-done < $tempfile
+modified=$(status ${autogendir:+$sources} ${ldefs_flag:+lisp}
${info_flag:+doc}) || die
+
+[ "$modified" ] && {
+ echo "Locally modified: $modified"
+ [ "$force" ] || die "There are local modifications"
+}
## Probably this is overkill, and there's no need to "bootstrap" just
@@ -259,21 +271,11 @@
done
done
- bzr status -S $outfile >| $tempfile || \
- die "bzr status error for generated $outfile"
-
local modified
- while read stat file; do
-
- [ "$stat" != "M" ] && \
- die "Unexpected status ($stat) for generated $file"
-
- modified="$modified $file"
-
- done < $tempfile
-
- commit "info/dir" $modified || die "bzr commit error"
+ modified=$(status $outfile) || die
+
+ commit "info/dir" $modified || die "commit error"
} # function info_dir
@@ -287,23 +289,11 @@
echo "Checking status of generated files..."
- bzr status -S $basegen >| $tempfile || \
- die "bzr status error for generated files"
-
- modified=
-
- while read stat file; do
-
- [ "$stat" != "M" ] && \
- die "Unexpected status ($stat) for generated $file"
-
- modified="$modified $file"
-
- done < $tempfile
+ modified=$(status $basegen) || die
cd $oldpwd
- commit "generated" $modified || die "bzr commit error"
+ commit "generated" $modified || die "commit error"
exit 0
} # $autogendir
@@ -371,24 +361,13 @@
## It probably would be fine to just check+commit lisp/, since
## making autoloads should not effect any other files. But better
## safe than sorry.
-bzr status -S $genfiles ${ldefs_out#lisp/} >| $tempfile || \
- die "bzr status error for generated files"
-
-
-modified=
-
-while read stat file; do
-
- [ "$stat" != "M" ] && die "Unexpected status ($stat) for generated $file"
- modified="$modified $file"
-
-done < $tempfile
+modified=$(status $genfiles ${ldefs_out#lisp/}) || die
cd ../
-commit "loaddefs" $modified || die "bzr commit error"
+commit "loaddefs" $modified || die "commit error"
exit 0
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r116015: * admin/update_autogen (status): New function. Use throughout.,
Glenn Morris <=