| 1 | #!/bin/sh |
| 2 | set -e |
| 3 | |
| 4 | cargo run -p peg-macros -- peg-macros/grammar.rustpeg > peg-macros/grammar_new.rs |
| 5 | |
| 6 | mv peg-macros/grammar.rs peg-macros/grammar_old.rs |
| 7 | cp peg-macros/grammar_new.rs peg-macros/grammar.rs |
| 8 | |
| 9 | if cargo run -p peg-macros -- peg-macros/grammar.rustpeg > peg-macros/grammar_new.rs |
| 10 | then |
| 11 | diff -qs peg-macros/grammar.rs peg-macros/grammar_new.rs |
| 12 | rustfmt peg-macros/grammar.rs |
| 13 | else |
| 14 | echo "Failed" |
| 15 | fi |