vsrccopy: fix detection of last argument

This commit is contained in:
Đoàn Trần Công Danh 2023-08-30 22:46:25 +07:00
parent da8a19b5ab
commit a6c4206699

View File

@ -173,7 +173,7 @@ vsrccopy() {
if [ $# -lt 2 ]; then
msg_error "vsrccopy <file>... <target>"
fi
_tgt="${@:-1}"
_tgt="${@: -1}"
mkdir -p "$_tgt"
while [ $# -gt 1 ]; do
cp -a "${XBPS_SRCDISTDIR}/${pkgname}-${version}/$1" "$_tgt"