mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-13 22:42:29 +03:00
Install gradle 1.7 to buildserver (untested, may need some extra config)
This commit is contained in:
parent
8cf3b9ec5d
commit
08380bfacc
2 changed files with 42 additions and 4 deletions
|
@ -49,22 +49,38 @@ if not os.path.exists(cachedir):
|
|||
os.mkdir(cachedir)
|
||||
cachefiles = [
|
||||
('android-sdk_r21.0.1-linux.tgz',
|
||||
'http://dl.google.com/android/android-sdk_r21.0.1-linux.tgz')]
|
||||
'http://dl.google.com/android/android-sdk_r21.0.1-linux.tgz',
|
||||
None),
|
||||
('gradle-1.7-bin.zip',
|
||||
'http://services.gradle.org/distributions/gradle-1.7-bin.zip',
|
||||
'360c97d51621b5a1ecf66748c718594e5f790ae4fbc1499543e0c006033c9d30')]
|
||||
if arch64:
|
||||
cachefiles.extend([
|
||||
('android-ndk-r8e-linux-x86_64.tar.bz2',
|
||||
'http://dl.google.com/android/ndk/android-ndk-r8e-linux-x86_64.tar.bz2')])
|
||||
'http://dl.google.com/android/ndk/android-ndk-r8e-linux-x86_64.tar.bz2',
|
||||
None)])
|
||||
else:
|
||||
cachefiles.extend([
|
||||
('android-ndk-r8e-linux-x86.tar.bz2',
|
||||
'http://dl.google.com/android/ndk/android-ndk-r8e-linux-x86.tar.bz2')])
|
||||
'http://dl.google.com/android/ndk/android-ndk-r8e-linux-x86.tar.bz2',
|
||||
None)])
|
||||
wanted = []
|
||||
for f, src in cachefiles:
|
||||
for f, src, shasum in cachefiles:
|
||||
if not os.path.exists(os.path.join(cachedir, f)):
|
||||
print "Downloading " + f + " to cache"
|
||||
if subprocess.call(['wget', src], cwd=cachedir) != 0:
|
||||
print "...download of " + f + " failed."
|
||||
sys.exit(1)
|
||||
if shasum:
|
||||
p = subprocess.Popen(['shasum', '-a', '256', os.path.join(cachedir, f)],
|
||||
stdout=subprocess.PIPE)
|
||||
v = p.communicate()[0].split(' ')[0]
|
||||
if v != shasum:
|
||||
print "Invalid shasum of '" + v + "' detected for " + f
|
||||
sys.exit(1)
|
||||
else:
|
||||
print "...shasum verified for " + f
|
||||
|
||||
wanted.append(f)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue