#!/usr/bin/env bash
set -euo pipefail

function usage() {
  echo "Usage: artifact [-h|--help] {layer,map,revision} [...]"
}

if [ $# -lt 1 ]; then
  usage >&2
  exit 1
fi

verb="$1"
shift

case "$verb" in
  -h|-help|--help)
    usage
    exit 0
    ;;
esac

exec "mapping/artifact/tools/$verb" "$@"
