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