Skip to content

Commit f8dd490

Browse files
committedAug 16, 2015
Support dos2unix as flip alternative
1 parent 9fc1b48 commit f8dd490

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed
 

‎scripts/astyle.sh

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,16 @@ if [ -z "$ASTYLE" ]; then
2929
fi
3030

3131
if ! type -p flip >/dev/null; then
32-
echo "flip not found" >&2
33-
flip() {
34-
:
35-
}
32+
if type -p dos2unix >/dev/null; then
33+
flip() {
34+
exec dos2unix $2
35+
}
36+
else
37+
echo "flip not found" >&2
38+
flip() {
39+
:
40+
}
41+
fi
3642
fi
3743

3844
if ! type -p pep8 >/dev/null; then

0 commit comments

Comments
 (0)
Please sign in to comment.