Sebastian Bøe | c6f367d | 2018-01-04 17:36:02 +0100 | [diff] [blame] | 1 | import os |
2 | |||||
3 | |||||
4 | def crash_if_zephyr_was_cloned_with_wrong_line_endings(): | ||||
5 | f = open('{}/Kconfig'.format(os.environ["ZEPHYR_BASE"]), 'U') | ||||
6 | f.readline() | ||||
7 | |||||
8 | error_msg = "Re-clone with autocrlf false. $ git config --global core.autocrlf false" | ||||
9 | |||||
10 | assert f.newlines == '\n', error_msg | ||||
11 | |||||
12 | def main(): | ||||
13 | crash_if_zephyr_was_cloned_with_wrong_line_endings() | ||||
14 | |||||
15 | if __name__ == "__main__": | ||||
16 | main() |