summaryrefslogtreecommitdiff
path: root/cerbero
diff options
context:
space:
mode:
authorAndoni Morales Alastruey <ylatuya@gmail.com>2013-05-10 21:04:48 (GMT)
committerAndoni Morales Alastruey <ylatuya@gmail.com>2013-05-10 21:04:48 (GMT)
commit1de52658da667638508578a6a429120f74c63a4b (patch)
treeb557c545d925178750bede82eff1bba874b3ccee /cerbero
parentc09784e114444c607aa10ddb4950bd27d988423f (diff)
downloadcerbero-1de52658da667638508578a6a429120f74c63a4b.tar.gz
cerbero-1de52658da667638508578a6a429120f74c63a4b.tar.xz
android: download NDK for the host architecture
Diffstat (limited to 'cerbero')
-rw-r--r--cerbero/bootstrap/android.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/cerbero/bootstrap/android.py b/cerbero/bootstrap/android.py
index c267fc9..6f69099 100644
--- a/cerbero/bootstrap/android.py
+++ b/cerbero/bootstrap/android.py
@@ -17,7 +17,6 @@
# Boston, MA 02111-1307, USA.
import os
-import shutil
from cerbero.bootstrap import BootstraperBase
from cerbero.bootstrap.bootstraper import register_bootstraper
@@ -28,17 +27,19 @@ from cerbero.utils import shell
class AndroidBootstraper (BootstraperBase):
NDK_BASE_URL = 'http://dl.google.com/android/ndk/'
- NDK_TAR = 'android-ndk-r8e-linux-x86.tar.bz2'
+ NDK_TAR = 'android-ndk-r8e-linux-%s.tar.bz2'
def start(self):
dest = self.config.toolchain_prefix
- tar = os.path.join(dest, self.NDK_TAR)
- if os.path.exists(dest):
- shutil.rmtree(dest)
- os.makedirs(dest)
- shell.download("%s/%s" % (self.NDK_BASE_URL, self.NDK_TAR), tar)
+ ndk_tar = self.NDK_TAR % self.config.arch
+ tar = os.path.join(dest, ndk_tar)
try:
- shell.unpack(tar, os.path.join(dest))
+ os.makedirs(dest)
+ except:
+ pass
+ shell.download("%s/%s" % (self.NDK_BASE_URL, ndk_tar), tar)
+ try:
+ shell.unpack(tar, dest)
shell.call('mv android-ndk-r8e/* .', dest)
except Exception:
pass