diff options
author | François Andriot <albator78@libertysurf.fr> | 2022-05-18 21:29:06 +0200 |
---|---|---|
committer | François Andriot <albator78@libertysurf.fr> | 2022-05-20 09:47:49 +0200 |
commit | 8ce6a8a0d41af3f4b0f28a196d70426e787d4cda (patch) | |
tree | 5d253d308d00af2b36d4d261382fbc43675aec7e /redhat/build/gather_rpm_sources.sh | |
parent | 2cf0d83f758ab912896d358640b1ccaf6dd39949 (diff) | |
download | tde-packaging-8ce6a8a0d41af3f4b0f28a196d70426e787d4cda.tar.gz tde-packaging-8ce6a8a0d41af3f4b0f28a196d70426e787d4cda.zip |
RPM: update build scripts
Signed-off-by: François Andriot <albator78@libertysurf.fr>
Diffstat (limited to 'redhat/build/gather_rpm_sources.sh')
-rwxr-xr-x | redhat/build/gather_rpm_sources.sh | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/redhat/build/gather_rpm_sources.sh b/redhat/build/gather_rpm_sources.sh index cba05b1f8..fd8b21a2b 100755 --- a/redhat/build/gather_rpm_sources.sh +++ b/redhat/build/gather_rpm_sources.sh @@ -32,10 +32,14 @@ cp -f ${SPECFILE} ${SOURCES} ${TARBALL} "${TARGETDIR}" PATCHDIR="${HOME}/tde/patches/${TDE_VERSION}/$1" if [ -d "${PATCHDIR}" ]; then - cat "${PATCHDIR}/"*".patch" "${PATCHDIR}/"*".patch${DIST}" >>"${TARGETDIR}/one.patch" - sed -i "${TARGETDIR}/"*".spec" \ - -e "/^Source0:/ s/$/\nPatch389: one.patch/" \ - -e "/%setup/ s/$/\n%patch389 -p1/" + cat "${PATCHDIR}/"*".patch" "${PATCHDIR}/"*".patch${DIST}" >>"${TARGETDIR}/one.patch" 2>/dev/null + if [ "$(cat "${TARGETDIR}/one.patch" | wc -c)" = 0 ]; then + rm -f "${TARGETDIR}/one.patch" + else + sed -i "${TARGETDIR}/"*".spec" \ + -e "/^Source0:/ s/$/\nPatch389: one.patch/" \ + -e "/%setup/ s/$/\n%patch389 -p1/" + fi fi exit $RET |