mirror of
https://codeberg.org/privacy1st/arch
synced 2024-12-23 01:16:04 +01:00
fix
This commit is contained in:
parent
ab7f51230c
commit
27875f6030
@ -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')
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user