diff options
author | Tim King <taking@google.com> | 2015-11-12 04:23:08 -0800 |
---|---|---|
committer | Tim King <taking@google.com> | 2015-11-12 04:23:08 -0800 |
commit | 304e0f3eb0fac012a3aac9ec02918f1e4616bde7 (patch) | |
tree | 1b29a9c02985b2443feb7991ac4226d5681af005 /contrib/new-theory | |
parent | ada1fc44c9b5b8746a2e1e4046032282149768b5 (diff) |
Updating the contrib/new-theory script and travis to use the new Makefile.theories script.
Diffstat (limited to 'contrib/new-theory')
-rwxr-xr-x | contrib/new-theory | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/contrib/new-theory b/contrib/new-theory index 1868fecec..8f9714372 100755 --- a/contrib/new-theory +++ b/contrib/new-theory @@ -133,17 +133,17 @@ else fi echo -echo "Adding $dir to THEORIES to src/Makefile.am..." -if grep -q '^THEORIES = .*[^a-zA-Z0-9_]'"$dir"'\([^a-zA-Z0-9_]\|$\)' src/Makefile.am &>/dev/null; then - echo "NOTE: src/Makefile.am already lists theory $dir" +echo "Adding $dir to THEORIES to src/Makefile.theories..." +if grep -q '^THEORIES = .*[^a-zA-Z0-9_]'"$dir"'\([^a-zA-Z0-9_]\|$\)' src/Makefile.theories &>/dev/null; then + echo "NOTE: src/Makefile.theories already lists theory $dir" else - awk '/^THEORIES = / {print $0,"'"$dir"'"} !/^THEORIES = / {print$0}' src/Makefile.am > src/Makefile.am.new-theory - if ! cp -f src/Makefile.am src/Makefile.am~; then - echo "ERROR: cannot copy src/Makefile.am !" >&2 + awk '/^THEORIES = / {print $0,"'"$dir"'"} !/^THEORIES = / {print$0}' src/Makefile.theories > src/Makefile.theories.new-theory + if ! cp -f src/Makefile.theories src/Makefile.theories~; then + echo "ERROR: cannot copy src/Makefile.theories !" >&2 exit 1 fi - if ! mv -f src/Makefile.am.new-theory src/Makefile.am; then - echo "ERROR: cannot replace src/Makefile.am !" >&2 + if ! mv -f src/Makefile.theories.new-theory src/Makefile.theories; then + echo "ERROR: cannot replace src/Makefile.theories !" >&2 exit 1 fi fi |