diff --git a/rpmlint.sh b/rpmlint.sh index fffc81a..ab06a5b 100755 --- a/rpmlint.sh +++ b/rpmlint.sh @@ -22,9 +22,16 @@ ARGUMENTS=$(echo "$ARGUMENTS" | xargs) # Perform rpmlint on comma-separated list of files if [[ -n "${RPMFILES}" ]]; then + RETURN_CODE="0" + set -e for FILE in $(echo "${RPMFILES}" | tr "," "\n"); do - rpmlint $ARGUMENTS $FILE + rpmlint "$ARGUMENTS" "$FILE" + if [[ "$?" != "0" ]]; then + RETURN_CODE="1" + fi done + set +e + exit "$RETURN_CODE" else rpmlint $ARGUMENTS fi