Add aosp group to projects present in AOSP manifest

Modified with the following fish shell script, except for 4 projects
which were adjusted manually because of ">" vs "/>":

  for line in (grep "<project " android-11.0.0_r48_default.xml)
      set name (echo $line | sed 's/.* name="\([^"]*\)" .*/\1/')
      set manifest_line (grep " name=\"$name\"" default.xml)
      if test -z "$manifest_line"
          #echo "AOSP project $name is not in our manifest!"
          continue
      end
      # Escape name for sed
      set name_esc (string replace -a / \\/ $name)
      if echo $manifest_line | grep -q "groups="
          # Contains groups= , either before or after name=
          sed -i 's/\(.* name="'$name_esc'".*\) groups="\(.*\)"\(.*\) \/>/\1 groups="aosp,\2"\3 \/>/' default.xml
          sed -i 's/\(.*\) groups="\(.*\)"\(.* name="'$name_esc'".*\) \/>/\1 groups="aosp,\2"\3 \/>/' default.xml
      else
          # Does not contain groups=
          sed -i 's/\(.* name="'$name_esc'" .*\) \/>/\1 groups="aosp" \/>/' default.xml
      end
      # Validate
      grep " name=\"$name\"" default.xml | grep -v "groups=\"aosp[,\"]"
  end

Don't add the tags for the following projects where we use CAF history
and not AOSP:
* hardware/qcom/bootctrl/
* hardware/qcom/display/
* hardware/qcom/gps/
* hardware/qcom/media/
* hardware/qcom/wlan/
* vendor/qcom/opensource/audio-hal/primary-hal/

Change-Id: I7ac4fdf29d9455856efd782d3ddb8728ddd21097
(cherry picked from commit 771f9a8e3c97ea8e71bbbfd00322a653d8e206d9)
1 file changed
tree: 8e0cfbf636857ee32092b69a8db0ac18399806c9
  1. default.xml