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 | |
parent | ada1fc44c9b5b8746a2e1e4046032282149768b5 (diff) |
Updating the contrib/new-theory script and travis to use the new Makefile.theories script.
-rw-r--r-- | .travis.yml | 4 | ||||
-rwxr-xr-x | contrib/new-theory | 16 |
2 files changed, 10 insertions, 10 deletions
diff --git a/.travis.yml b/.travis.yml index 18204d3c6..f3d680374 100644 --- a/.travis.yml +++ b/.travis.yml @@ -51,9 +51,9 @@ script: } addNewTheoryTest() { contrib/new-theory test_newtheory || error "NEWTHEORY FAILED"; - grep -q '^THEORIES *=.* test_newtheory' src/Makefile.am || error "NEWTHEORY FAILED"; + grep -q '^THEORIES *=.* test_newtheory' src/Makefile.theories || error "NEWTHEORY FAILED"; contrib/new-theory --alternate test_newtheory test_newalttheory || error "NEWTHEORY-ALTERNATE FAILED"; - grep -q '^THEORIES *=.* test_newalttheory' src/Makefile.am || error "NEWTHEORY-ALTERNATE FAILED"; + grep -q '^THEORIES *=.* test_newalttheory' src/Makefile.theories || error "NEWTHEORY-ALTERNATE FAILED"; } LFSCchecks() { cd proofs/lfsc_checker && 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 |