From e06efd6bbb32d9261c0e4b09c46adbe7b6de5873 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= Date: Tue, 11 Feb 2020 22:51:33 +0100 Subject: [PATCH] hooks/do-extract: refrain from extracting text files outside wrksrc --- common/hooks/do-extract/00-distfiles.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/common/hooks/do-extract/00-distfiles.sh b/common/hooks/do-extract/00-distfiles.sh index cd70c48bace..b23b9e14fd9 100644 --- a/common/hooks/do-extract/00-distfiles.sh +++ b/common/hooks/do-extract/00-distfiles.sh @@ -128,7 +128,11 @@ hook() { fi ;; txt) - cp -f $srcdir/$curfile $extractdir + if [ "$create_wrksrc" ]; then + cp -f $srcdir/$curfile $extractdir + else + msg_error "$pkgname: ${curfile##*.} files can only be extracted when create_wrksrc is set\n" + fi ;; 7z) if command -v 7z &>/dev/null; then