diff --git a/shutils/binpkg.sh b/shutils/binpkg.sh index d31892ca6c7..a3a6de5c4c2 100644 --- a/shutils/binpkg.sh +++ b/shutils/binpkg.sh @@ -46,8 +46,12 @@ xbps_write_metadata_pkg() # Write the files list. local TMPFLIST=$(mktemp -t flist.XXXXXXXXXX) || exit 1 - find $destdir | sort -ur | \ + # First add the regular files. + find $destdir -type f | \ sed -e "s|$destdir||g;s|^\/$||g;/^$/d" > $TMPFLIST + # and add the directories at the end. + find $destdir -type d | sort -ur | \ + sed -e "s|$destdir||g;s|^/$||g;/^$/d" >> $TMPFLIST # Write the property list file. local TMPFPROPS=$(mktemp -t fprops.XXXXXXXXXX) || exit 1