#!/bin/sh set -e exec 1>&2 failed= cmp_and_fail() { if ! cmp "$1" "$2" then failed=failed fi } COMMAND=cmp_and_fail if [ "$1" = "--fix" ]; then COMMAND=cp fi # https://gitlab.com/preserves/preserves/-/issues/30 # # So it turns out that Racket's git-checkout mechanism pays attention # to portions of the tree outside the package of interest, which is # totally fair enough! # # But it means we can't use updir-containing symlinks anywhere in the # repository if we want to have a Racket-installable package as well, # *even if* the non-Racket implementation concerned is OK with # updir-containing symlinks. # Ensure that various copies of schema.prs, schema.bin, path.bin, # samples.pr and samples.bin are in fact identical. ${COMMAND} path/path.bin implementations/python/preserves/path.prb ${COMMAND} schema/schema.bin implementations/python/preserves/schema.prb ${COMMAND} schema/schema.prs implementations/racket/preserves/preserves-schema/schema.prs ${COMMAND} tests/samples.bin implementations/python/tests/samples.bin ${COMMAND} tests/samples.pr implementations/python/tests/samples.pr ${COMMAND} tests/samples.pr implementations/racket/preserves/preserves/tests/samples.pr [ -z "$failed" ]