1
1
mirror of https://github.com/wader/fq.git synced 2024-12-25 22:34:14 +03:00
fq/dev/fqbin-test.sh

18 lines
413 B
Bash
Raw Normal View History

2021-09-18 13:31:03 +03:00
#!/bin/sh
if which expect >/dev/null 2>&1; then
TEMPDIR=$(mktemp -d)
go build -o "${TEMPDIR}/fq" main.go
PATH="${TEMPDIR}:${PATH}" expect dev/fqbin-test.exp >"${TEMPDIR}/fq.log"
EXIT="$?"
if [ $EXIT != "0" ]; then
cat "${TEMPDIR}/fq.log"
fi
rm -rf "${TEMPDIR}"
if [ $EXIT != "0" ]; then
exit 1
fi
else
echo "fq-test.sh: skip as expect is not installed"
fi