File fix-install-completion.patch of Package android-tools

diff -ruN a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -14,8 +14,7 @@
 option(ANDROID_TOOLS_LIBUSB_ENABLE_UDEV "Enable udev for device enumeration and hotplug support" OFF)
 
 # Install bash/zsh completion files.
-set(COMPLETION_COMMON_DIR "${CMAKE_INSTALL_FULL_DATADIR}/android-tools/completions")
-add_subdirectory(completions)
+set(COMPLETION_COMMON_DIR "${CMAKE_INSTALL_FULL_DATADIR}/bash-completion/completions")
 
 # Android provides it's own version of mke2fs which is incompatible with
 # the version shipped by e2fsprogs. To prevent a name clash we install
diff -ruN a/vendor/adb/adb.bash b/vendor/adb/adb.bash
--- a/vendor/adb/adb.bash
+++ b/vendor/adb/adb.bash
@@ -15,6 +15,10 @@
 # limitations under the License.
 #
 
+check_type() {
+    type -t "$1"
+}
+
 _adb() {
     if ! check_type "$1" >/dev/null; then
         return
diff -ruN a/vendor/core/fastboot/fastboot.bash b/vendor/core/fastboot/fastboot.bash
--- a/vendor/core/fastboot/fastboot.bash
+++ b/vendor/core/fastboot/fastboot.bash
@@ -15,6 +15,10 @@
 # limitations under the License.
 #
 
+check_type() {
+    type -t "$1"
+}
+
 _fastboot() {
     if ! check_type "$1" >/dev/null; then
         return
openSUSE Build Service is sponsored by