#!/bin/sh -e ########################################################################### # # dn42 registry - policy checks # ########################################################################### commit="$1" mntner="$2" if [ -z "$commit" ] || [ -z "$mntner" ] then >&2 echo "Usage: $0 COMMIT YOUR-MNT" exit 1 fi check_script='utils/schema-check/dn42_schema_local.py' exitcode=0 ########################################################################### # determine registry directory # # this will fail if the script is in the PATH or is sourced but those # both seem unlikely. In any case if it does fail an env var can be used # to override the check rdir="$REGDIR" if [ -z "$rdir" ] then rdir=$(cd -- "$(dirname -- "$0")" && pwd) fi if ! [ -x "${rdir}/${check_script}" ] then >&2 cat <&2 echo 'FAILED: check the output for details' exit "$exitcode" fi # all good exit 0 ########################################################################### # end of file