#!/bin/sh # Replace rebar3 symlinks under _build/.../test with real copies (BusyBox cp -L fails on them). set -eu APP_ROOT="${APP_ROOT:-/app}" DEST="${APP_ROOT}/_build/test/lib/eventhub/test" mkdir -p "${DEST}" rm -rf "${DEST}/unit" "${DEST}/api" cp -a "${APP_ROOT}/test/unit" "${DEST}/unit" cp -a "${APP_ROOT}/test/api" "${DEST}/api" # shellcheck disable=SC2086 cp -a ${APP_ROOT}/test/api_*_SUITE.erl "${DEST}/" 2>/dev/null || true if [ "$#" -gt 0 ]; then exec "$@" fi