Last active
August 3, 2016 01:11
-
-
Save xuhdev/2565b258b562270854c05f2eb813e16d to your computer and use it in GitHub Desktop.
Generate an editorconfig file from a gitignore file.
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
#!/bin/bash | |
# Generate an editorconfig file from a gitignore file. Usage: | |
# | |
# /path/to/gen-editorconfig-from-gitignore.sh < .gitignore >> .editorconfig | |
while read line | |
do | |
if [[ -z $line ]] | |
then | |
continue | |
fi | |
cat <<-EOF | |
[$line] | |
indent_style = none | |
indent_size = none | |
tab_width = none | |
end_of_line = none | |
charset = none | |
max_line_length = none | |
EOF | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment