zeek/auxil/btest/testing/Scripts/strip-test-base
Patrick Kelley 8fd444092b initial
2025-05-07 15:35:15 -04:00

16 lines
352 B
Bash
Executable File

#! /usr/bin/env bash
#
dir=$(dirname "$0")
testbase=$(cd "$dir/.." && pwd)
SCRIPTS="$(dirname -- "${BASH_SOURCE[0]}")"
# shellcheck disable=SC2086
# shellcheck disable=SC2157
if [ ${SCRIPTS}/is-windows ]; then
# shellcheck disable=SC2001
testbase=$(echo "${testbase}" | sed 's#/\([a-zA-Z]\)/\(.*\)#\u\1:/\2#')
fi
sed "s#${testbase}#<...>#g"