diff --git a/pkg/de-p1st-repo/PKGBUILD b/pkg/de-p1st-repo/PKGBUILD index c8bdcbe..e8732ea 100644 --- a/pkg/de-p1st-repo/PKGBUILD +++ b/pkg/de-p1st-repo/PKGBUILD @@ -2,7 +2,7 @@ _pkgname=repo _reponame=arch-pkg pkgname="de-p1st-$_pkgname" -pkgver=0.0.9 +pkgver=0.0.10 pkgrel=1 pkgdesc="Bash script to manage remote Arch Linux repository" arch=('any') diff --git a/pkg/de-p1st-repo/arch-repo-receive-new.sh b/pkg/de-p1st-repo/arch-repo-receive-new.sh index 098f87c..ec05d56 100644 --- a/pkg/de-p1st-repo/arch-repo-receive-new.sh +++ b/pkg/de-p1st-repo/arch-repo-receive-new.sh @@ -55,9 +55,9 @@ function sort_pkgname_pkgver(){ echo "Sorting packages by package name and package version ..." for PKG in ./*.pkg.tar.{xz,zst}; do - get_pkginfo "$PKG" || return $? - get_pkgname "$PKGINFO" || return $? - get_pkgver "$PKGINFO" || return $? + get_pkginfo "$PKG" || { echo "get_pkginfo failed"; return 1; } + get_pkgname "$PKGINFO" || { echo "get_pkgname failed"; return 1; } + get_pkgver "$PKGINFO" || { echo "get_pkgver failed"; return 1; } echo "Creating file ./db/${PKGNAME} with content ${PKG} ..." mkdir -p "db/${PKGNAME}" || return $? @@ -73,9 +73,9 @@ function get_pkginfo(){ # return: 0 on success if endswith "$1" ".pkg.tar.xz"; then - PKGINFO=$(tar -xvf "$1" -O .PKGINFO) || return $? + PKGINFO=$(tar -xvf "$1" -O .PKGINFO) || { echo "tar failed"; return 1; } elif endswith "$1" ".pkg.tar.zst"; then - PKGINFO=$(tar -I zstd -xvf "$1" -O .PKGINFO) || return $? + PKGINFO=$(tar -I zstd -xvf "$1" -O .PKGINFO) || { echo "tar failed"; return 1; } else echo "$1 does not seem to be a package!" return 1