Last active
April 17, 2019 21:59
-
-
Save Joxebus/13e4180c2ba9c121e5a212e96141f32b to your computer and use it in GitHub Desktop.
Ant Builder Groovy Shell Script Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env groovy | |
version = '2.2.0' | |
release = '2.11-2.2.0' | |
url = "http://apache.claz.org/kafka/${version}/kafka_${release}.tgz" | |
tempDir = "/tmp/groovy_workshop" | |
destDir = "/Users/obautista/Documents/workspace-public/GroovyWorkshopExamples/src/main/resources/download" | |
def ant = new AntBuilder() | |
println "Downloading sources" | |
ant.get(src: url, dest: tempDir) | |
println "Decompressing file" | |
ant.untar( | |
src: "$tempDir/kafka_${release}.tgz", | |
dest: destDir, | |
compression:"gzip", overwrite:true | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment