mirror of
https://github.com/zen-browser/desktop.git
synced 2025-07-07 10:05:30 +02:00
26 lines
760 B
Bash
26 lines
760 B
Bash
#!/bin/bash
|
|
|
|
# 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
|
|
|
|
# Create the new file with the same content as the original
|
|
npm run export ${new_file} &
|
|
done
|
|
|
|
for job in $(jobs -p); do
|
|
echo $job
|
|
wait $job || let "FAIL+=1"
|
|
done
|
|
|
|
echo "All patches have been exported successfully."
|