Skip to content

Instantly share code, notes, and snippets.

@orangeclover
Created November 5, 2011 11:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save orangeclover/1341420 to your computer and use it in GitHub Desktop.
Save orangeclover/1341420 to your computer and use it in GitHub Desktop.
Web上にあるjarを、GROOV_HOME/lib にダウンロードする
// Web上にあるjarを、GROOV_HOME/lib にダウンロードする
// 例 gomoku
// https://gist.github.com/1341266
downLoadUrl = "https://github.com/downloads/sile/gomoku/gomoku-0.0.4.jar"
GroovyHome = System.getProperty("groovy.home") + File.separator + "lib"
url = new URL(downLoadUrl)
file = new File(GroovyHome, new File(url.file).name)
url.withInputStream { input ->
file.bytes = input.bytes
}
println "download $url -> $file"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment