Created
June 19, 2013 16:24
-
-
Save ysb33r/5815662 to your computer and use it in GitHub Desktop.
groovy-vfs makes downloading & unpacking very simple. The following works well for smaller archives. Once the archive contains thousands of files, it is better to download first and then unpack. (This is due to a performance issue inside VFS2, not groovy-vfs).
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
@Grapes([ | |
@GrabResolver( name='grysb33r', root='http://dl.bintray.com/ysb33r/grysb33r' ), | |
@Grab( 'org.ysb33r.groovy:groovy-vfs:0.2' ), | |
@Grab( 'commons-httpclient:commons-httpclient:3.1') | |
]) | |
import org.ysb33r.groovy.dsl.vfs.VFS | |
// This will download the compressed archive from Sourceforge and unpack it to a local directory | |
new VFS() { | |
cp "tgz:http://downloads.sourceforge.net/project/nant/nant/0.92/nant-0.92-bin.tar.gz", | |
new File("./Downloads"), | |
overwrite:true | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment