vsrcextract: support partial extract

e.g:

	vsrcextract -C dst --strip-components=3 archive.tar.gz path/to/asset
This commit is contained in:
Đoàn Trần Công Danh 2025-01-05 11:36:49 +07:00
parent 2d2958c00b
commit 9e76db6117
1 changed files with 3 additions and 1 deletions

View File

@ -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() {