From e64f6c2c4613dc414b44915761ee6060d40a20c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Mon, 27 Feb 2023 11:41:57 +0700 Subject: [PATCH] hooks/do-extract: fix for extract distfiles to single file We missed the case that distfiles was extracted to a single file. Instead of changing the second leg, we can simply remove the third leg because renaming the empty $extractdir to $wrksrc is the same of create new empty $wrksrc --- common/hooks/do-extract/00-distfiles.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/common/hooks/do-extract/00-distfiles.sh b/common/hooks/do-extract/00-distfiles.sh index 13d42fd9b32..eba3ba04bba 100644 --- a/common/hooks/do-extract/00-distfiles.sh +++ b/common/hooks/do-extract/00-distfiles.sh @@ -205,11 +205,8 @@ hook() { # rename the subdirectory (top-level of distfiles) to $wrksrc mv "$innerdir" "$wrksrc" && rmdir "$extractdir" - elif [ "$num_dirs" -gt 1 ] || [ -n "$create_wrksrc" ]; then - # rename the tmpdir to wrksrc - mv "$extractdir" "$wrksrc" else - mkdir -p "$wrksrc" + mv "$extractdir" "$wrksrc" fi || msg_error "$pkgver: failed to move sources to $wrksrc\n" }