This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# pre-commit.rb | |
# Exit 1 if is a text file and has a BOM at the head of the file | |
# Create list of file extensions that are considered text files. | |
text_files = [ | |
".awk", | |
".bas", | |
".bat", | |
".cfc", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/ruby | |
# Output a list of the unique file extensions in this directory and all subdirectories | |
# lowercased and sorted | |
extensions = {} | |
Dir.glob('**/*') do |f| | |
ext = File.extname(f).downcase | |
extensions[ext] = ext if ext | |
end | |
puts extensions.keys.sort |
NewerOlder