#!/bin/bash

# Configure the environment-dependent CGROUP matchers for the docker workload
# attestors.
CGROUP_MATCHERS=
if [ -n "${GITHUB_WORKFLOW}" ]; then
    CGROUP_MATCHERS='"/actions_job/<id>"'
fi
sed -i.bak "s#CGROUP_MATCHERS#$CGROUP_MATCHERS#" conf/agent/agent.conf

"${ROOTDIR}/setup/x509pop/setup.sh" conf/server conf/agent

"${ROOTDIR}/setup/debugserver/build.sh" "${RUNDIR}/conf/server/debugclient"
"${ROOTDIR}/setup/debugagent/build.sh" "${RUNDIR}/conf/agent/debugclient"
