diff options
author | François Andriot <[email protected]> | 2022-05-18 21:29:06 +0200 |
---|---|---|
committer | François Andriot <[email protected]> | 2022-05-20 09:50:17 +0200 |
commit | 7f790f695d457b930486f1981ffb252cc09a74b1 (patch) | |
tree | cb4a09dd04c1e31f85b612054560e81b32eac526 /redhat/build/gather_rpm_sources.sh | |
parent | a9a0aa144af42eead9c2a04101385411ca42d98e (diff) | |
download | tde-packaging-7f790f695d457b930486f1981ffb252cc09a74b1.tar.gz tde-packaging-7f790f695d457b930486f1981ffb252cc09a74b1.zip |
RPM: update build scripts
Signed-off-by: François Andriot <[email protected]>
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 7961b95be..df6cadc9d 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 |