Skip to content

Instantly share code, notes, and snippets.

/gist:2715319

Created May 17, 2012
Embed
What would you like to do?
#!/bin/bash
THIS_FOLDER=`dirname $0`
node=$1
# What files have changed
files=`hg log --template="{files}" -r $node`
# Check each
for file in $files; do
type=`hg cat -r tip $file | file -b -`
if [[ "$type" =~ "text, with CRLF line terminators" ]]; then
echo "INFO: $file is $type"
echo "ERROR: $file is not ascii text with unix line ends"
exit 1;
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment