Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env ruby
- STANDARD_IGNORES = %w{*.aux
- *.blg
- *.log
- *.bbl
- *.fdb_latexmk}
- previous_ignore = (File.read('.gitignore') rescue "").split("\n")
- new_ignores = previous_ignore + STANDARD_IGNORES
- latex_files = Dir.glob("*tex")
- latex_files.each { |x| new_ignores << x.gsub(".tex", ".pdf") }
- File.open(".gitignore", "w") { |f| f.puts new_ignores.uniq.join("\n") }
Add Comment
Please, Sign In to add comment