Skip to content

Commit

Permalink
scripts/tags_diff.sh: detect error of diff
Browse files Browse the repository at this point in the history
  • Loading branch information
tenzap committed May 1, 2024
1 parent 874d2e9 commit dda7521
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions scripts/tags_diff.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#
# SPDX-License-Identifier: GPL-3.0-or-later

set -e

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"

if [ "$PWD/scripts" = "$SCRIPT_DIR" ]; then
Expand Down Expand Up @@ -66,10 +68,17 @@ for regex in "${IGNORE_MATCHING_LINES[@]}"; do
done

mydiff() {
set +e
diff \
"${DIFF_IGNORE_ARGS[@]}" \
-x '*.err' \
"$@"
RET=$?
set -e
if [ "$RET" -gt 1 ]; then
echo "failure. Diff exited with $RET"
exit $RET
fi
}

for lib in "${LIBS[@]}"; do
Expand Down Expand Up @@ -121,3 +130,5 @@ for lib in "${LIBS[@]}"; do
done
done
done

echo "Done."

0 comments on commit dda7521

Please sign in to comment.