Files
desktop/scripts/recalculate-patches.sh
mr. m 199da1f824 chore: Updated to firefox 142.0, p=#9870
* chore: Updateed to firefox 142.0, b=no-bug, c=l10n, folders

* chore: Finish updating to firefox, b=no-bug, c=tabs

* chore: Fixed mods builds, b=no-bug, c=mods

* feat: Small changes to tabs layout, b=no-bug, c=tabs, compact-mode, folders, workspaces

* test: Fixed tests, b=no-bug, c=scripts, tests, folders

* test: Fixed tests, b=no-bug, c=tabs, tests, welcome
2025-08-13 23:21:38 +02: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/.
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
# Replace all - with . and remove the .patch extension
new_file="${patch_file%/*}/$(basename "$patch_file" | sed 's/-/./' | sed 's/\.patch$//').patch"
new_file="${new_file%.patch}"
new_file="${new_file#src/}"
if [[ $new_file == *-mjs ]]; then
new_file="${new_file/-mjs/.mjs}"
fi
if [[ $new_file == *-ftl ]]; then
new_file="${new_file/-ftl/.ftl}"
fi
new_file_base=$(basename "$new_file")
if [[ ! " ${IGNORE_FILES[@]} " =~ " ${new_file_base} " ]]; then
npm run export ${new_file}
fi
done
for job in $(jobs -p); do
echo $job
wait $job || let "FAIL+=1"
done
echo "All patches have been exported successfully."