summaryrefslogtreecommitdiffstats
path: root/redhat/build/gather_rpm_sources.sh
diff options
context:
space:
mode:
Diffstat (limited to 'redhat/build/gather_rpm_sources.sh')
-rwxr-xr-xredhat/build/gather_rpm_sources.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/redhat/build/gather_rpm_sources.sh b/redhat/build/gather_rpm_sources.sh
index fb9499e4f..decabea84 100755
--- a/redhat/build/gather_rpm_sources.sh
+++ b/redhat/build/gather_rpm_sources.sh
@@ -11,6 +11,8 @@ TARGETDIR="${3:-/tmp/${PKGNAME}-${TDE_VERSION}}"
DIST="$4"
SPECFILE=$(get_specfile.sh ${PKGNAME} ${TDE_VERSION})
+[ -z "${SPECFILE}" ] && exit 1
+
SOURCES=$(get_source_files.sh ${PKGNAME} ${TDE_VERSION} ${DIST})
TARBALL=$(get_latest_tarball_filename.sh ${PKGNAME} ${TDE_VERSION} || :)
VERSION=$(get_latest_tarball_version.sh ${PKGNAME} ${TDE_VERSION} || :)
@@ -23,6 +25,7 @@ BUILDROOTDIR="${TMPPATH}/BUILDROOT${DIST}.$(uname -i)"
LOGFILE="${TMPPATH}/log.${COMP##*/}"
mkdir -p "${TARGETDIR}"
+rm -f "${TARGETDIR}/"*
cp -f ${SPECFILE} ${SOURCES} ${TARBALL} "${TARGETDIR}"