#!/bin/sh

set -eu

PHASE="${1:?usage: rekono-phase <phase> <command> [argument...]}"
shift

PROGRESS=/run/rekono/progress

"$@"

printf '%s\n' "${PHASE}" >> "${PROGRESS}"