mirror of
https://github.com/eth-p/bat-extras.git
synced 2024-12-12 17:20:40 +01:00
Change build.sh to use less verbose output for verification
This commit is contained in:
parent
06746d0e24
commit
b08128e550
@ -1 +1 @@
|
||||
Subproject commit d435022a4e579f877408beee52fd42a94735c4a1
|
||||
Subproject commit 527a57d07ac44d0d2f602b6f14a7bd3c4bd7fc8d
|
23
build.sh
23
build.sh
@ -314,6 +314,25 @@ done
|
||||
|
||||
if "$OPT_VERIFY"; then
|
||||
printc "\n%{YELLOW}Verifying scripts...%{CLEAR}\n" 1>&2
|
||||
"${HERE}/test.sh" --compiled
|
||||
exit $?
|
||||
|
||||
# Run the tests.
|
||||
FAIL=0
|
||||
while read -r action data1 data2 splat; do
|
||||
[[ "$action" == "result" ]] || continue
|
||||
|
||||
printf "\x1B[G\x1B[K%s" "$data1" 1>&2
|
||||
if [[ "$data2" == "fail" ]]; then
|
||||
printf " failed.\n" 1>&2
|
||||
((FAIL++)) || true
|
||||
fi
|
||||
done < <("${HERE}/test.sh" --compiled --porcelain)
|
||||
|
||||
# Print the overall result.
|
||||
if [[ "$FAIL" -ne 0 ]]; then
|
||||
printc "%{RED}One or more tests failed.\n" 1>&2
|
||||
printc "Run ./test.sh for more detailed information.%{CLEAR}\n" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
printc "\x1B[G\x1B[K%{YELLOW}Verified successfully.%{CLEAR}\n" 1>&2
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user