0
Fork 0
mirror of https://codeberg.org/librewolf/source.git synced 2024-12-22 21:53:31 -05:00
LibreWolf/scripts/fuzzfail.sh

43 lines
1,023 B
Bash
Raw Permalink Normal View History

2022-06-01 13:15:40 -05:00
tmpdir="tmpdir92"
if [ ! -f version ]; then
echo "error: 'version' does not exist. Are you in the right folder?"
exit 1
fi
firefox=firefox-$(cat version).source.tar.xz
if [ ! -f "$firefox" ]; then
echo "error: '$firefox' does not exist."
exit 1
fi
failed_patches=
rm -rf $tmpdir
mkdir $tmpdir
cd $tmpdir
tar xf ../$firefox
cd firefox-$(cat ../version)
for curpatch in $(cat ../../assets/patches.txt); do
patch --fuzz=0 -p1 -i ../../$curpatch > ../patch.tmp
s=""
for j in $(grep -n rej$ ../patch.tmp | awk '{ print $(NF); }'); do
2022-06-01 14:53:19 -05:00
s="$s $j"
2022-06-01 13:15:40 -05:00
done
s=$s
if [ ! -z "$s" ]; then
2022-06-01 14:53:19 -05:00
echo "$curpatch"
git config --global commit.gpgsign false
(ff=firefox-$(cat ../../version) && cd ../.. && scripts/git-patchtree.sh $curpatch && cd $ff && git diff $(git rev-list --max-parents=0 HEAD) HEAD > ../$curpatch.nofuzz && cd .. && rm -rf $ff)
git config --global commit.gpgsign true
2022-06-01 13:15:40 -05:00
fi
2022-06-01 14:53:19 -05:00
2022-06-01 13:15:40 -05:00
rm -f ../patch.tmp
done
cd ../..
rm -rf $tmpdir