File tree Expand file tree Collapse file tree 1 file changed +13
-7
lines changed
.github/workflows/scripts Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ set -o pipefail
33
33
# VARIABLES #
34
34
35
35
# List of file extensions to process:
36
- extensions=(" js" " mjs" " cjs" " json" " ts" " py" " jl" " R" " c" " h" " cpp" " hpp" " f" " sh" " awk" " html" " xml" " css" " md" " yml" " gypi" " bib" " tex" )
36
+ extensions=(" js" " mjs" " cjs" " json" " ts" " py" " jl" " R" " c" " h" " cpp" " hpp" " f" " sh" " awk" " html" " xml" " css" " md" " yml" " gyp " " gypi" " bib" " tex" " mk " )
37
37
38
38
39
39
# FUNCTIONS #
@@ -70,13 +70,19 @@ main() {
70
70
convert_line_endings " $file "
71
71
72
72
extension=" ${file##* .} "
73
+ filename=$( basename " $file " )
74
+
73
75
local match_found=false
74
- for ext in " ${extensions[@]} " ; do
75
- if [[ " $ext " == " $extension " ]]; then
76
- match_found=true
77
- break
78
- fi
79
- done
76
+ if [[ " $filename " == " Makefile" ]]; then
77
+ match_found=true
78
+ elif [[ " $file " == * .* ]]; then
79
+ for ext in " ${extensions[@]} " ; do
80
+ if [[ " $ext " == " $extension " ]]; then
81
+ match_found=true
82
+ break
83
+ fi
84
+ done
85
+ fi
80
86
if [[ " $match_found " == true ]]; then
81
87
if [[ " $( tail -c1 " $file " ; echo x) " != $' \n x' ]]; then
82
88
echo " Adding newline to: $file "
You can’t perform that action at this time.
0 commit comments