From f5e4ea9e146c6e47042ed9df41e9f65f02eb0931 Mon Sep 17 00:00:00 2001 From: Mathieu Arnold Date: Thu, 23 Jan 2020 08:55:25 +0000 Subject: [PATCH] Unbreak make makepatch. The glob in `find ./*` is handled by the shell and actually sorts the files, so one needs to to ask find to sort the result, using `find -s`. `find ./* -maxdepth 0` is not equivalent to `find . -maxdepth 0`, the depth increases by one as `./x` is on level deeper than `.`. Pointy hat: bdrewery --- Mk/Scripts/smart_makepatch.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Mk/Scripts/smart_makepatch.sh b/Mk/Scripts/smart_makepatch.sh index e61dc294e4b8..286242ba388e 100644 --- a/Mk/Scripts/smart_makepatch.sh +++ b/Mk/Scripts/smart_makepatch.sh @@ -69,7 +69,7 @@ std_patch_filename() { patchdir_files_list() { if [ -d "${PATCHDIR}" ]; then (cd ${PATCHDIR} && \ - find . -type f -name "patch-*" -maxdepth 0 \ + find -s . -type f -name "patch-*" -maxdepth 1 \ 2>/dev/null | sed -e 's,^\./,,; /\.orig$/d' ) fi; @@ -216,7 +216,7 @@ stage_patches() { local P local name local patch_list - patch_list=$(cd ${REGENNED} && find . -name "patch-*" 2>/dev/null) + patch_list=$(cd ${REGENNED} && find -s . -name "patch-*" 2>/dev/null) for P in ${patch_list}; do P=${P#./} name=$(get_patch_name ${P})