#!/usr/bin/env bash set -euo pipefail repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)" tmp="$(mktemp -d "${repo_root}/.garbage-collection-test.XXXXXX")" trap 'rm -rf "${tmp}"' EXIT fail() { echo "test failed: $*" >&2 exit 1 } units="${tmp}/units" dropins="${tmp}/dropins" mkdir -p "${units}" "${dropins}" "${tmp}/bin" fake_uid=1000 cat >"${tmp}/bin/id" <