Salome HOME
projects
/
modules
/
shaper.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added checkbox in UI for optional fuzzy parameter
[modules/shaper.git]
/
findEndLines.sh
diff --git
a/findEndLines.sh
b/findEndLines.sh
index 4f3a19fa69cb0009c781b4ca001a377544ed7efb..eb3c0cc70b06ba0d3859f675a6d0dbc04af9f94f 100755
(executable)
--- a/
findEndLines.sh
+++ b/
findEndLines.sh
@@
-1,9
+1,33
@@
#!/bin/bash
#!/bin/bash
+FIX_LINE_ENDINGS=0
+while [[ $# > 0 ]]; do
+ key="$1"
+
+ case $key in
+ fix)
+ FIX_LINE_ENDINGS=1
+ shift
+ ;;
+ *)
+ shift
+ ;;
+ esac
+done
+
source env.sh
find . \( -name "*.h" -o -name "*.cpp" \) -exec cpplint.py --filter=-,+whitespace/end_of_line --verbose=0 --counting=detailed {} \+ 2>&1 | grep -v Done | tee ./tofix
source env.sh
find . \( -name "*.h" -o -name "*.cpp" \) -exec cpplint.py --filter=-,+whitespace/end_of_line --verbose=0 --counting=detailed {} \+ 2>&1 | grep -v Done | tee ./tofix
-#python correction_auto_2.py --cpplint_output_file ./tofix
+WRONG=0
+if [ -s ./tofix ]; then
+ if [[ ${FIX_LINE_ENDINGS} == 1 ]]; then
+ python correction_auto_2.py --cpplint_output_file ./tofix
+ echo "NOTE: Line endings are fixed"
+ else
+ WRONG=1
+ fi
+fi
rm ./tofix
rm ./tofix
+exit $WRONG