fix: build if package not found
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
nyyu 2023-02-04 09:29:40 +01:00
parent 46465140df
commit 71ab5381f1

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/bash +x
# shellcheck disable=SC3044,SC3009
. .util.sh
@ -22,7 +22,7 @@ build() {
epoch=${epoch}:
fi
if pacman -Si "${name}" | grep -v nyyu | grep -c -E '^Repository' &>/dev/null; then
if pacman -Si "${name}" || true | grep -v nyyu | grep -c -E '^Repository' &>/dev/null; then
echo "WARN: Found ${name} in arch repo"
fi
@ -52,7 +52,7 @@ for d in */; do
fi
if ! grep -c 'pkgver()' PKGBUILD >/dev/null; then
repo=$(grep -oPm 1 'github\.com\/\K([a-z0-9]|-)+\/([a-z0-9]|-)+' .SRCINFO)
repo=$(grep -oPm 1 'github\.com\/\K(\w|-)+\/(\w|-)+' .SRCINFO)
if [ -n "${repo}" ]; then
update_github_tag "${repo}" && update_pkg
fi