Guest User

Untitled

a guest
Jun 24th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. // g100pon #43 zip圧縮・解凍
  2. //
  3. // Usage : groovy zip zipfile [file ...]
  4.  
  5.  
  6. if( args.length<2 ){
  7. println 'error'
  8. System.exit(0)
  9. }
  10.  
  11. // 1)
  12. zipfile = args[0]
  13.  
  14. // 2)
  15. filelist = []
  16. args.each { filelist.add(it) }
  17. filelist.remove(0)
  18.  
  19. sb = ''<<''
  20. filelist.each{ sb << it << ' ' }
  21.  
  22. // 3)
  23. new AntBuilder().zip(destfile:zipfile, basedir:'.',includes:"${sb.toString()}")
Add Comment
Please, Sign In to add comment