Skip to content

Instantly share code, notes, and snippets.

@kanemu
Created May 16, 2010 05:07
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 kanemu/402674 to your computer and use it in GitHub Desktop.
Save kanemu/402674 to your computer and use it in GitHub Desktop.
[groovy]引数のディレクトリ以下の「Fonts」フォルダの中身を1カ所に集める。
@Grab(group='org.apache.ant', module='ant-parent', version='1.7.1')
def dirPath=args[0]
def File dir = new File(dirPath)
def ant = new AntBuilder()
ant.mkdir(dir:dirPath+'/Fonts')
dir.eachDirRecurse {
if('Fonts'==it.name){
it.eachFileRecurse {
if(it.isFile()){
println "${it.path}"
ant.copy(file:it.path, toFile:dirPath+'/Fonts/'+it.name, overwrite:false)
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment