lib/l5m-tools/application.rb in l5m-tools-0.0.10 vs lib/l5m-tools/application.rb in l5m-tools-0.0.11

- old
+ new

@@ -17,10 +17,22 @@ #FileUtils.rm(line, :force => true) if delete FileUtils.rm(line, :force => true) if duplicate_and_replace( line.chomp , replacements )[1] != line && delete end end end - end + end + #read file list from file and delete them + def del(*args) + replacements = {args[1] => args[2]} + File.open(args[0], "r") do |infile| + while (line = infile.gets) + line = line.chomp.strip + if line.length > 0 && line[0] != '#' + FileUtils.rm(line, :force => true) + end + end + end + end def make_app(package, application, use_base_worker, &block) application[0] = application[0].capitalize replacements = { '!REPLACE_ME_FILE!' => application, '!REPLACE_STYLE!' => package