Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 48b6724d authored by Nishith  Khanna's avatar Nishith Khanna
Browse files

Split third party script into another file

Its better to keep in different file as third party patches rarely needs an update and this causes errors when only e_patches needs an update
parent 96f21093
Loading
Loading
Loading
Loading
Loading
+0 −10
Original line number Original line Diff line number Diff line
@@ -70,13 +70,3 @@ for commit in $(git rev-list --reverse "$chromium_commit_hash"..HEAD); do
    mv "$temp_patch_file" "$patch_path"
    mv "$temp_patch_file" "$patch_path"
    echo "$patch_filename" >> "$output_patch_file"
    echo "$patch_filename" >> "$output_patch_file"
done
done

while read dir patch; do
  [ -z "$dir" ] && continue  # skip empty lines
  subject=${patch%.patch}
  formatted_subject=${subject//-/" "}
  echo "Updating patch: $formatted_subject"
  cd $root_dir/src/third_party/$dir
  commit_hash=$(git log --pretty=format:"%H %s" | grep -F "$formatted_subject" | head -n 1 | awk '{print $1}')
  git format-patch -1 --stdout "$commit_hash" --subject-prefix="" > $root_dir/build/third_party/$patch
done < "${root_dir}/build/third_party_patches_list.txt"
+13 −0
Original line number Original line Diff line number Diff line
#!/usr/bin/env bash

root_dir=$(dirname "$(readlink -f "$0")")

while read dir patch; do
  [ -z "$dir" ] && continue  # skip empty lines
  subject=${patch%.patch}
  formatted_subject=${subject//-/" "}
  echo "Updating patch: $formatted_subject"
  cd $root_dir/src/third_party/$dir
  commit_hash=$(git log --pretty=format:"%H %s" | grep -F "$formatted_subject" | head -n 1 | awk '{print $1}')
  git format-patch -1 --stdout "$commit_hash" --subject-prefix="" > $root_dir/build/third_party/$patch
done < "${root_dir}/build/third_party_patches_list.txt"