Created
March 31, 2017 07:17
-
-
Save scoutman57/63845c77df7bfdca6bd9ee0858775bc2 to your computer and use it in GitHub Desktop.
This file contains 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 | |
puts "This program will add the OSX folder icon to your global .gitignore file." | |
puts "Enter the full path to your global .gitignore file." | |
print "Path: " | |
location = gets.chomp | |
if (location.nil?) | |
puts "No path specified, program exiting." | |
exit 1 | |
end | |
f = File.open(location, "a+") # append | |
f.write("\n# REMINDER: do not edit between these lines") | |
f.write("\n# OSX folder icon Icon\\r Icon? Icon^M^M") | |
f.write("\nIcon\r\r") | |
f.write("\n# END REMINDER OSX folder icon\n") | |
f.close | |
exit # quit interactive ruby session |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment