X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=shell%2Fpackage-listing.sh;h=c0b5476ca35e8f31c17f53d0711d5ace9cbd3ec4;hb=a86c6e8d376c95aa00b179fce9d207e61c8f72d0;hp=b2afe33a4105ea758a4172cc63828ad2d196ea00;hpb=81720af2dfe65051fb01be99bbfa672d05f39558;p=releng%2Fglobal-jjb.git diff --git a/shell/package-listing.sh b/shell/package-listing.sh old mode 100644 new mode 100755 index b2afe33a..c0b5476c --- a/shell/package-listing.sh +++ b/shell/package-listing.sh @@ -28,8 +28,7 @@ DIFF_PACKAGES=/tmp/packages_diff.txt # Swap to creating END_PACKAGES if we are running in a CI job (determined by if # we have a workspace env) or if the starting packages listing already exists. PACKAGES="${START_PACKAGES}" -if ( [ "${workspace}" ] || [ -f "${START_PACKAGES}" ] ) -then +if [ "${workspace}" ] || [ -f "${START_PACKAGES}" ]; then PACKAGES="${END_PACKAGES}" fi @@ -47,15 +46,14 @@ case "${OS_FAMILY}" in ;; esac -if ( [ -f "${START_PACKAGES}" ] && [ -f "${END_PACKAGES}" ] ) -then - diff "${START_PACKAGES}" "${END_PACKAGES}" > "${DIFF_PACKAGES}" +if [ -f "${START_PACKAGES}" ] && [ -f "${END_PACKAGES}" ]; then + # ` || 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 # location -if [ "${workspace}" ] -then +if [ "${workspace}" ]; then mkdir -p "${workspace}/archives/" cp -f /tmp/packages_*.txt "${workspace}/archives/" fi