diff --git a/scripts/recalculate-patches.sh b/scripts/recalculate-patches.sh index 547d25093..eb51d2661 100644 --- a/scripts/recalculate-patches.sh +++ b/scripts/recalculate-patches.sh @@ -2,26 +2,25 @@ # 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/}" + # 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 + 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} & + # 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" +for job in $(jobs -p); do + echo $job + wait $job || let "FAIL+=1" done echo "All patches have been exported successfully." diff --git a/scripts/remove-failed-jobs.sh b/scripts/remove-failed-jobs.sh index b168405e2..73cd5f621 100644 --- a/scripts/remove-failed-jobs.sh +++ b/scripts/remove-failed-jobs.sh @@ -1,21 +1,21 @@ #!/bin/bash gh_bulk_delete_workflow_runs() { - local repo=$1 + local repo=zen-browser/$1 # Ensure the repo argument is provided if [[ -z "$repo" ]]; then - echo "Usage: gh_bulk_delete_workflow_runs " + echo "Usage: gh_bulk_delete_workflow_runs " return 1 fi # Fetch workflow runs that are cancelled, failed, or timed out local runs runs=$(gh api repos/$repo/actions/runs --paginate \ - | jq -r '.workflow_runs[] | - select(.conclusion == "cancelled" or - .conclusion == "failure" or - .conclusion == "timed_out") | + | jq -r '.workflow_runs[] | + select(.conclusion == "cancelled" or + .conclusion == "failure" or + .conclusion == "timed_out") | .id') if [[ -z "$runs" ]]; then