#!/bin/bash

# This script is called by the SwiftShader into Android AutoRoller:
# https://autoroll.skia.org/r/swiftshader-android

# Remove git submodules
# Android does not allow remote submodules (b/189557997)
git config --file .gitmodules --get-regexp path | awk '{ system("git rm " $2) }'
rm .gitmodules
Remove git submodules before rolling into Android
Remove git submodules before rolling into Android

This change adds a script which is to be called by the SwiftShader into
Android AutoRoller: https://autoroll.skia.org/r/swiftshader-android

It prepares a checkout for upload into the Android repo. Specifically,
Android does not allow remote submodules, so this script removes them.
Note SwiftShader does not require any submodules to build the library;
they are optional for development purposes.

Bug: b/189557997
Change-Id: I36b4ae59cd843f1c69146f0f52ce8f323c6bc15a
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/54768
Reviewed-by: Alexis Hétu <1c7141772178a7e80858c3db5052b328076f08f4@google.com>
Kokoro-Result: kokoro <2ac7b1f3fa578934c95181d4272be0d3bca00121@google.com>
Tested-by: Nicolas Capens <51edc787c30f24c4904e8ffbb5523c3a9f7a451d@google.com>
