#!/bin/sh
VERSION=118.0.2
tar --files-from=file.list -xJvf ../firefox-$VERSION.source.tar.xz
mv firefox-$VERSION firefox-$VERSION-orig
cp -rf ./firefox-$VERSION-new ./firefox-$VERSION
diff --unified -Nr firefox-$VERSION-orig firefox-$VERSION > firefox-$VERSION-riscv64gc.patch
mv firefox-$VERSION-riscv64gc.patch ../patches
rm -rf ./firefox-$VERSION
rm -rf ./firefox-$VERSION-orig