From a43b4640b0076c820a73b48584211eae2a778614 Mon Sep 17 00:00:00 2001 From: Bert van der Weerd Date: Mon, 11 Apr 2022 11:35:30 +0200 Subject: [PATCH] finished check-patchfail.sh --- .../check-patchfail.sh | 32 +++++++++++++------ 1 file changed, 23 insertions(+), 9 deletions(-) rename check-patchfail.sh => scripts/check-patchfail.sh (60%) diff --git a/check-patchfail.sh b/scripts/check-patchfail.sh similarity index 60% rename from check-patchfail.sh rename to scripts/check-patchfail.sh index eaf958f..062697c 100755 --- a/check-patchfail.sh +++ b/scripts/check-patchfail.sh @@ -1,5 +1,3 @@ -set -e - tmpdir="tmpdir92" if [ ! -f version ]; then @@ -26,17 +24,33 @@ cd firefox-$(cat ../version) echo "" echo "Testing patches..." -echo "" + for i in $(cat ../../assets/patches.txt); do - echo $i: - patch -p1 -i ../../$i - patch -R -p1 -i ../../$i + echo "" + echo "==> $i:" + echo "" + patch $* -p1 -i ../../$i > ../patch.tmp + cat ../patch.tmp + + s="" + for j in $(grep -n rej$ ../patch.tmp | awk '{ print $(NF); }'); do + s="$s $j" + done + s=$s + if [ ! -z "$s" ]; then + echo "" + for k in $s; do + echo "--> $s:" + cat $s + done + fi + + rm -f ../patch.tmp + #patch -R -p1 -i ../../$i done cd ../.. +echo "" echo "Removing '$tmpdir'..." rm -rf $tmpdir - -echo "" -echo "All patches succeeded." exit 0