fix tar colon

This commit is contained in:
Daniel Langbein 2021-04-25 18:06:00 +02:00
parent ad0b122f47
commit 4f27a51a8b
2 changed files with 3 additions and 3 deletions

View File

@ -2,7 +2,7 @@
_pkgname=repo
_reponame=arch-pkg
pkgname="de-p1st-$_pkgname"
pkgver=0.0.15
pkgver=0.0.16
pkgrel=1
pkgdesc="Bash script to manage remote Arch Linux repository"
arch=('any')

View File

@ -82,9 +82,9 @@ function get_pkginfo(){
# return: 0 on success
if endswith "$1" ".pkg.tar.xz"; then
PKGINFO=$(tar -xf "$1" -O .PKGINFO) || { echo "tar failed"; return 1; }
PKGINFO=$(tar -xf "$1" -O .PKGINFO --force-local) || { echo "tar failed"; return 1; }
elif endswith "$1" ".pkg.tar.zst"; then
PKGINFO=$(tar -I zstd -xf "$1" -O .PKGINFO) || { echo "tar failed"; return 1; }
PKGINFO=$(tar -I zstd -xf "$1" -O .PKGINFO --force-local) || { echo "tar failed"; return 1; }
else
echo "$1 does not seem to be a package!"
return 1