Avoid blind chmod on android_cmd

Check for the missing exec bit before attempting to change it instead.
This commit is contained in:
Manuel Bua 2014-05-13 00:15:29 +02:00
parent aba13fd265
commit f8573663f0

View file

@ -312,7 +312,8 @@ class TargetAndroid(Target):
# 3 pass installation.
need_refresh = False
self.buildozer.cmd('chmod ug+x {}'.format(self.android_cmd))
if not os.access(self.android_cmd, os.X_OK):
self.buildozer.cmd('chmod ug+x {}'.format(self.android_cmd))
# 1. update the tool and platform-tools if needed
packages = self._android_list_sdk()