Skip to content
Snippets Groups Projects

Cleanup

39 files
+ 7
132669
Compare changes
  • Side-by-side
  • Inline
Files
39
+ 0
43
apply plugin: "de.undercouch.download"
ext {
archiveUrl = "https://code.usgs.gov/ghsc/nshmp/nshm-fault-sections/-/archive"
faultsDir = "fault-sections";
}
task downloadFaultSections() {
doLast {
// Download and unzip nshm-fault-sections tag 1.1
def zipFile1p1 = new File(faultsDir, "nshm-fault-sections-1.1.zip")
download.run {
src "${archiveUrl}/1.1/nshm-fault-sections-1.1.zip"
dest zipFile1p1
}
copy {
from zipTree(zipFile1p1)
into faultsDir
}
delete {
delete zipFile1p1
}
// Download and unzip nshm-fault-sections tag 1.1
def zipFile1p2 = new File(faultsDir, "nshm-fault-sections-1.2.zip")
download.run {
src "${archiveUrl}/1.2/nshm-fault-sections-1.2.zip"
dest zipFile1p2
}
copy {
from zipTree(zipFile1p2)
into faultsDir
}
delete {
delete zipFile1p2
}
}
}
task faultSectionsClean(type: Delete) {
delete faultsDir
}
clean.dependsOn faultSectionsClean
Loading