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 <sugoi@google.com>
Kokoro-Result: kokoro <noreply+kokoro@google.com>
Tested-by: Nicolas Capens <nicolascapens@google.com>
diff --git a/tools/prepare_for_android.sh b/tools/prepare_for_android.sh
new file mode 100755
index 0000000..8a093b2
--- /dev/null
+++ b/tools/prepare_for_android.sh
@@ -0,0 +1,9 @@
+#!/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
\ No newline at end of file