From 94852cd393687f955d352cf2a0686b3e802c4c9e Mon Sep 17 00:00:00 2001
From: Chizi123 <build@jsrv.com>
Date: Fri, 30 Oct 2020 05:39:56 +0000
Subject: [PATCH] fixed working with zoom exception

---
 main.sh |   22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/main.sh b/main.sh
index f2108a5..2974e8f 100755
--- a/main.sh
+++ b/main.sh
@@ -47,7 +47,7 @@
 # Usage: build_pkg [package name] [-f force]
 function build_pkg {
 	#check if PKGBUILD has updated, don't rebuild if hasn't changed
-	if [[ -n "$(git pull | grep 'Already up to date.')" && -z "$(grep 'pkgver() {' PKGBUILD)" && -z "$2" ]]; then
+	if [[ -n "$(git pull | grep 'Already up to date.')" && -z "$(grep 'pkgver[[:space:]]() {' PKGBUILD)" && -z "$2" ]]; then
 		return 2
 	fi
 
@@ -81,6 +81,16 @@
 	done
 	while read -r -d '' x; do pkgs+=("$x"); done < <(printf "%s\0" "${ipkgs[@]}" | sort -uz)
 
+	# Weird exceptions
+	if [[ "$1" == "zoom" ]]; then
+		rm zoom*_orig*
+		for i in ${pkgs[@]}; do
+			if [ -z "${i##*_orig*}" ]; then
+				pkgs=(${pkgs[@]/$i})
+			fi
+		done
+	fi
+
 	#Move package to repodir and add to repo db
 	#Dont change the database if rebuilt the same package at same release and version
 	flag=0
@@ -97,16 +107,6 @@
 		done
 	else 
 		return;
-	fi
-
-	# Weird exceptions
-	if [[ "$1" == "zoom" ]]; then
-		rm zoom*_orig*.pkg.tar.xz
-		for i in ${pkgs[@]}; do
-			if [ -z "${i##*orig*}" ]; then
-				pkgs=${pkgs[@]/$i}
-			fi
-		done
 	fi
 
 	# Add package to waiting list to be added to repo db

--
Gitblit v1.9.3