summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/misc-functions.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh
index b266764f9..79ce43628 100755
--- a/bin/misc-functions.sh
+++ b/bin/misc-functions.sh
@@ -907,8 +907,10 @@ dyn_package() {
dyn_spec() {
local sources_dir=/usr/src/rpm/SOURCES
mkdir -p "${sources_dir}"
+ declare -a tar_args=("${EBUILD}")
+ [[ -d ${FILESDIR} ]] && tar_args=("${EBUILD}" "${FILESDIR}")
tar czf "${sources_dir}/${PF}.tar.gz" \
- "${EBUILD}" "${FILESDIR}" || \
+ "${tar_args[@]}" || \
die "Failed to create base rpm tarball."
cat <<__END1__ > ${PF}.spec