1
1
mirror of https://github.com/wader/fq.git synced 2024-12-25 14:23:18 +03:00
fq/dev/fqbin-test.sh
2021-09-18 12:31:03 +02:00

18 lines
413 B
Bash
Executable File

#!/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