xen: use vsrcextract

This commit is contained in:
Đoàn Trần Công Danh 2023-07-12 12:42:07 +07:00 committed by Đoàn Trần Công Danh
parent e1a6b64e94
commit 77a4de4385
2 changed files with 29 additions and 16 deletions

View file

@ -167,3 +167,20 @@ vsrcextract() {
vextract "$sc" ${dst:+-C "$dst"} \
"${XBPS_SRCDISTDIR}/${pkgname}-${version}/$1"
}
vtar() {
bsdtar "$@"
}
vsrccopy() {
local _tgt
if [ $# -lt 2 ]; then
msg_error "vsrccopy <file>... <target>"
fi
_tgt="${@:-1}"
mkdir -p "$_tgt"
while [ $# -gt 1 ]; do
cp -a "${XBPS_SRCDISTDIR}/${pkgname}-${version}/$1" "$_tgt"
shift
done
}