Files
desktop/scripts/recalculate-patches.sh
mr. m 7e7d860c9e chore: Sync upstream Firefox to version 147.0, p=#11822
* chore: Sync upstream to `Firefox 147.0`

* chore: Continued migration, b=no-bug, c=tests

* chore: Finish migration without testing, b=no-bug, c=scripts, tabs, media, common, split-view

* feat: Finish migration, b=no-bug, c=common, compact-mode, split-view, workspaces

* feat: Finish basic migration, b=no-bug, c=kbs, common, folders

* feat: Update surfer, b=no-bug, c=scripts
2026-01-08 18:06:05 +01:00

37 lines
1.0 KiB
Bash

#!/bin/bash
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
set -e
# FIrst check if importing the patches succeeds
npm run import
IGNORE_FILES=(
"shared.nsh"
"ignorePrefs.json"
)
# Recursively find all .patch files in the current directory and its subdirectories
find src -type f -name "*.patch" | while read -r patch_file; do
# Get the file from the inside of the file as indicated by the patch
target_file=$(grep -m 1 -E '^\+\+\+ b/' "$patch_file" | sed 's/^\+\+\+ b\///')
if [[ -z "$target_file" ]]; then
echo "No target file found in patch: $patch_file"
continue
fi
new_file_base=$(basename "$target_file")
if [[ ! " ${IGNORE_FILES[@]} " =~ " ${new_file_base} " ]]; then
npm run export ${target_file}
fi
done
for job in $(jobs -p); do
echo $job
wait $job || let "FAIL+=1"
done
echo "All patches have been exported successfully."