From 88a91e608a78b3521d333313005db2ef6e812cae Mon Sep 17 00:00:00 2001
From: Joel Grunbaum <joelgrun@gmail.com>
Date: Thu, 08 Oct 2020 00:09:25 +0000
Subject: [PATCH] Get package names instead of globbing
---
main.sh | 21 ++++++++++++++++-----
1 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/main.sh b/main.sh
index f135478..ce058ff 100755
--- a/main.sh
+++ b/main.sh
@@ -66,10 +66,19 @@
return 1
fi
+ #Get build artifact names
+ source PKGBUILD
+ pkgs=()
+ for i in ${pkgname[@]}; do
+ pkgs+=("$i-$pkgver-$pkgrel")
+ done
+
#Move package to repodir and add to repo db
- rm $REPODIR/*$1*.pkg.tar.??*
- cp *$1*.pkg.tar.?? $REPODIR/
- [[ "$SIGN" == "Y" ]] && cp *$1*.pkg.tar.??.sig $REPODIR/
+ for i in ${pkgs[@]}; do
+ rm $REPODIR/$i*.pkg.tar.??*
+ cp $i*.pkg.tar.?? $REPODIR/
+ [[ "$SIGN" == "Y" ]] && cp $i*.pkg.tar.??.sig $REPODIR/
+ done
# Weird exceptions
if [[ "$1" == "zoom" ]]; then
@@ -90,7 +99,9 @@
while true; do
# Wait until package is at the top of the queue and add to db
if [[ "$(head -n1 $REPODIR/.waitlist)" == "$1" ]]; then
- repo-add $([[ "$SIGN" == "Y" ]] && echo "--sign --key $KEY") $REPODIR/$REPONAME.db.tar.xz $REPODIR/*$1*.pkg.tar.??
+ for i in ${pkgs[@]}; do
+ repo-add $([[ "$SIGN" == "Y" ]] && echo "--sign --key $KEY") $REPODIR/$REPONAME.db.tar.xz $REPODIR/$i*.pkg.tar.??
+ done
while true; do
if [[ $(cat $REPODIR/.waitlist.lck) == 1 ]]; then
sleep 1
@@ -219,7 +230,7 @@
echo "To: $EMAIL"
echo "Subject: Build errors"
echo "There were build errors for the build of $REPONAME at $(date), please address them soon."
- echo "The errors were: $1"
+ echo "The errors were: $@"
) | sendmail -t
}
--
Gitblit v1.10.0