server-sdk/scripts/check.sh
2019-11-08 11:15:34 +01:00

21 lines
474 B
Bash
Executable File

#!/bin/bash
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
source $CURRENT_DIR/common.sh
SOURCE_DIR=$PWD
cd $SOURCE_DIR
info "Checking line ending"
RESULT=$( find . -not -type d ! -path '.git' -exec file "{}" ";" | grep "ASCII text, with CRLF" | cat )
if [ ! -z "$RESULT" ]; then
echo "----------------------------------"
echo "$RESULT"
echo "----------------------------------"
fail "LF check finished with error"
fi