0
Fork 0
mirror of https://codeberg.org/librewolf/source.git synced 2025-01-03 03:10:07 -05:00

update fix-patch.sh

This commit is contained in:
Malte Jürgens 2023-03-15 12:25:17 +01:00
parent 0bdb7a98dd
commit 60461a1c32
No known key found for this signature in database
GPG key ID: D29FBD5F93C0CFC3

View file

@ -24,12 +24,23 @@ make "firefox-$version.source.tar.xz"
tar xf "firefox-$version.source.tar.xz"
cd "firefox-$version"
echo "-> Settings up git"
echo "-> Setting up git"
git init
files="$(cat ../$1 | grep '+++ b/' | sed 's/\+\+\+ b\///')"
echo "$files" | xargs touch
echo "$files" | xargs git add
echo "-> Done"
echo "You can now apply the patch with:"
echo " cd 'firefox-$version' && patch -p1 -i '$(readlink -f ../$1)'"
echo "-> Trying to apply patch"
patch -p1 -i "../$1"
echo "-> Done. You can now fix the patch. If you are done,"
echo " press enter to update the patch with your changes"
echo " or Ctrl+C to abort."
read
echo "-> Updating patch"
git diff >"../$1"
echo "-> Cleaning up"
cd ..
rm -rf "firefox-$version"