mirror of
https://github.com/wader/fq.git
synced 2024-12-25 22:34:14 +03:00
18 lines
413 B
Bash
18 lines
413 B
Bash
|
#!/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
|