Guest User

Untitled

a guest
May 25th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. #!/usr/bin/env ruby
  2.  
  3. STANDARD_IGNORES = %w{*.aux
  4. *.blg
  5. *.log
  6. *.bbl
  7. *.fdb_latexmk}
  8.  
  9. previous_ignore = (File.read('.gitignore') rescue "").split("\n")
  10.  
  11. new_ignores = previous_ignore + STANDARD_IGNORES
  12. latex_files = Dir.glob("*tex")
  13. latex_files.each { |x| new_ignores << x.gsub(".tex", ".pdf") }
  14.  
  15. File.open(".gitignore", "w") { |f| f.puts new_ignores.uniq.join("\n") }
Add Comment
Please, Sign In to add comment