Skip to content
Snippets Groups Projects
Verified Commit 0823934e authored by akwizgran's avatar akwizgran
Browse files

Don't download Tor binaries if they already exist.

parent ff44edf7
No related branches found
No related tags found
Loading
......@@ -74,18 +74,26 @@ def downloadBinary(name) {
.replace('geoip', "geoip-${geoipVersion}")
.replaceAll('_', '-')
dest "${torBinaryDir}/${name}.zip"
onlyIfNewer true
}
}
def verifyBinary(name, chksum) {
return tasks.create([
name : "verifyBinary${name}",
type : Verify,
dependsOn: downloadBinary(name)]) {
src "${torBinaryDir}/${name}.zip"
algorithm 'SHA-256'
checksum chksum
String filename = "${torBinaryDir}/${name}.zip"
if (new File("bramble-android/${filename}").exists()) {
return tasks.create("verifyBinary${name}", Verify) {
src filename
algorithm 'SHA-256'
checksum chksum
}
} else {
return tasks.create([
name : "verifyBinary${name}",
type : Verify,
dependsOn: downloadBinary(name)]) {
src filename
algorithm 'SHA-256'
checksum chksum
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment