Pass multiple pattern args in logs-deploy.sh
[releng/global-jjb.git] / shell / package-listing.sh
old mode 100644 (file)
new mode 100755 (executable)
index 266dbbe..82ee902
@@ -47,9 +47,10 @@ case "${OS_FAMILY}" in
     ;;
 esac
 
-if [ -f "${START_PACKAGES}" ]
+if ( [ -f "${START_PACKAGES}" ] && [ -f "${END_PACKAGES}" ] )
 then
-    diff "${START_PACKAGES}" "${END_PACKAGES}" > "${DIFF_PACKAGES}"
+    # ` || true` Ignore exit code because diff exits 1 when there is a diff
+    diff "${START_PACKAGES}" "${END_PACKAGES}" > "${DIFF_PACKAGES}" || true
 fi
 
 # If running in a Jenkins job, then copy the created files to the archives