From 91b88ef96023dd1aae5d55527382c013e05bf70a Mon Sep 17 00:00:00 2001 From: langfingaz Date: Sun, 25 Apr 2021 16:31:34 +0200 Subject: [PATCH] fix --- pkg/de-p1st-repo/PKGBUILD | 2 +- pkg/de-p1st-repo/arch-repo-receive-new.sh | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/de-p1st-repo/PKGBUILD b/pkg/de-p1st-repo/PKGBUILD index 53bec83..2a31c6a 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.11 +pkgver=0.0.12 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 69d8fd8..e274a0e 100644 --- a/pkg/de-p1st-repo/arch-repo-receive-new.sh +++ b/pkg/de-p1st-repo/arch-repo-receive-new.sh @@ -91,8 +91,8 @@ function get_pkgname(){ # remove "pkgname = " as well as tailing whitespace characters local tmp - tmp=$(echo "$PKGINFO" | grep '^pkname') || return $? - PKGVER=$(echo "$tmp" | sed 's|^pkgname\s*=\s*||; s|\s*$||') || return $? + tmp=$(echo "${PKGINFO}" | grep '^pkname') || { echo "grep failed"; return 1; } + PKGVER=$(echo "${tmp}" | sed 's|^pkgname\s*=\s*||; s|\s*$||') || { echo "sed failed"; return 1; } } # # get pkgver from $PKGINFO @@ -102,8 +102,8 @@ function get_pkgver(){ # remove "pkgver = " as well as tailing whitespace characters local tmp - tmp=$(echo "$PKGINFO" | grep '^pkgver') || return $? - PKGVER=$(echo "$tmp" | sed 's|^pkgver\s*=\s*||; s|\s*$||') || return $? + tmp=$(echo "${PKGINFO}" | grep '^pkgver') || { echo "grep failed"; return 1; } + PKGVER=$(echo "${tmp}" | sed 's|^pkgver\s*=\s*||; s|\s*$||') || { echo "sed failed"; return 1; } }