From b1fba7ec2104b6e3dbe02b34be806c1b512d0ee8 Mon Sep 17 00:00:00 2001
From: Maniack Crudelis <maniackc_dev@crudelis.fr>
Date: Tue, 28 May 2019 01:23:39 +0200
Subject: [PATCH] Fix multiple upgrade_from

---
 package_check.sh | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/package_check.sh b/package_check.sh
index 2d52a42..5a0f7e9 100755
--- a/package_check.sh
+++ b/package_check.sh
@@ -1146,8 +1146,11 @@ then
 			then
 				# Add the commit to the upgrade list
 				line="${line##*from_commit=}"
-				echo "$line" >> "$script_dir/upgrade_list"
-			else
+                # Add the upgrade to the list only if the test is set to 1
+                if [ $temp_upgrade -eq 1 ]; then
+                    echo "$line" >> "$script_dir/upgrade_list"
+                fi
+			elif [ $temp_upgrade -eq 1 ]; then
 				# Or simply 'current' for a standard upgrade.
 				echo "current" >> "$script_dir/upgrade_list"
 			fi