#!/bin/sh

set -euo pipefail

METADIR=$2
# check if the "type" field is set to "external"
# crude way without jq, fragile but good enough for this sample...
if [ "$(grep type "$METADIR/metadata.json" |cut -f4 -d\")" = "external" ]; then
    exit 0
fi

exit 1
