| 1 | #!/bin/shscip-shell filesystem . . `/bin/sh`. |
| 2 | if [scip-shell system . . `[`. -z "$ALEMBIC" -o ! -d contrib/ast-db-manage ]; then |
| 3 | echoscip-shell system . . echo. "Run 'make check-alembic' to use this script" >&2 |
| 4 | exit 1 |
| 5 | fi |
| 6 | |
| 7 | if [scip-shell system . . `[`. "$ALEMBIC" = ":" ]; then |
| 8 | echoscip-shell system . . echo. "Install alembic and re-run configure before using this target." |
| 9 | exit 1 |
| 10 | fi |
| 11 | |
| 12 | cd contrib/ast-db-manage |
| 13 | |
| 14 | FOUNDERROR= |
| 15 | for id in "$@"; do |
| 16 | if [scip-shell system . . `[`. -n "$($ALEMBIC -c ${id}.ini.sample branches)" ]; then |
| 17 | echoscip-shell system . . echo. "Alembic branches exist for $id - details follow:" |
| 18 | # This second run is needed to display the errors because |
| 19 | # formatting was lost in the first execution. |
| 20 | $ALEMBIC -c ${id}.ini.sample branches |
| 21 | # Display all errors before reporting failure to Make. |
| 22 | FOUNDERROR=yes |
| 23 | fi |
| 24 | done |
| 25 | |
| 26 | if [scip-shell system . . `[`. -n "$FOUNDERROR" ]; then |
| 27 | # One or more failures. |
| 28 | exit 1 |
| 29 | fi |