From 9e76db61177f84131a923c569306190202460e63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Sun, 5 Jan 2025 11:36:49 +0700 Subject: [PATCH] vsrcextract: support partial extract e.g: vsrcextract -C dst --strip-components=3 archive.tar.gz path/to/asset --- common/environment/setup/archive.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/environment/setup/archive.sh b/common/environment/setup/archive.sh index 2f84d0afacb..57414ff8a11 100644 --- a/common/environment/setup/archive.sh +++ b/common/environment/setup/archive.sh @@ -160,8 +160,10 @@ vsrcextract() { break ;; esac done + local archive="$1" + shift vextract "$sc" ${dst:+-C "$dst"} \ - "${XBPS_SRCDISTDIR}/${pkgname}-${version}/$1" + "${XBPS_SRCDISTDIR}/${pkgname}-${version}/$archive" "$@" } vtar() {