mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-11 08:15:48 +00:00
19 lines
419 B
Bash
Executable File
19 lines
419 B
Bash
Executable File
#!/bin/bash
|
|
|
|
function checkEOL {
|
|
local changedFiles=$(git --no-pager diff --name-only -M100% --diff-filter=AM --relative $(git merge-base FETCH_HEAD origin/HEAD) FETCH_HEAD)
|
|
local result=0
|
|
for name in $changedFiles; do
|
|
grep -c -U -q $'\r' $name
|
|
if [ $? -eq 0 ]; then
|
|
echo "windows eol found in $name" >&2
|
|
result=1
|
|
fi
|
|
done
|
|
if [ $result -eq 1 ]; then
|
|
false
|
|
fi
|
|
}
|
|
|
|
checkEOL
|