From 7ac53faa1544a9c8ace058a2721647f368b059a6 Mon Sep 17 00:00:00 2001
From: Chizi123 <build@jsrv.com>
Date: Thu, 15 Oct 2020 02:41:30 +0000
Subject: [PATCH] Merge branch 'master' of https://github.com/Chizi123/Arch-autobuild-repo into master

---
 main.sh |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/main.sh b/main.sh
index dadd091..83e9c4a 100755
--- a/main.sh
+++ b/main.sh
@@ -58,7 +58,7 @@
 		"$1" == "ttf-win7-fonts" ]]; then
 		makepkg -s --noconfirm $([[ $CLEAN == "Y" ]] && echo "-c") $([[ $SIGN == "Y" ]] && echo "--sign --key $KEY") $([[ "$2" == "-f" ]] && echo -f) --skipchecksums
 	else
-		makepkg -s --noconfirm $([[ $CLEAN == "Y" ]] && echo "-c") $([[ $SIGN == "Y" ]] && echo "--sign --key $KEY") $([[ "$2" == "-f" ]] && echo -f)
+		makepkg -s --noconfirm $([[ $CLEAN == "Y" ]] && echo "-c") $([[ $SIGN == "Y" ]] && echo "--sign --key $KEY") $([[ "$2" == "-f" ]] && echo -f) 2>&1
 	fi
 	if [[ $? != 0 ]]; then
 		#Register error
@@ -71,7 +71,7 @@
 	pkgs=()
 	for i in ${pkgname[@]}; do
 		#pkgs+=("$i-$pkgver-$pkgrel")
-		pkgs++("$i")
+		pkgs+=("$i")
 	done
 
 	#Move package to repodir and add to repo db
@@ -119,7 +119,7 @@
 		else
 			if [[ -z "$(grep $1 $REPODIR/.waitlist)" ]]; then
 				# Not on waitlist for some reason, need to readd
-				if [[ $(cat $REPODIR/.waitlist.lck) == 1]]; then
+				if [[ $(cat $REPODIR/.waitlist.lck) == 1 ]]; then
 					sleep 1
 				else
 					echo 1 > $REPODIR/.waitlist.lck
@@ -150,6 +150,8 @@
 		sudo pacman -Syu --noconfirm
 	fi
 
+	#Remove waitlist and errors from old builds
+	rm -f $REPODIR/{.waitlist,.errors}
 	#update every package currently stored
 	for d in $(find $BUILDDIR -maxdepth 1 -mindepth 1 -type d)
 	do

--
Gitblit v1.9.3