Improve scripts
This commit is contained in:
parent
d7b3e0f46a
commit
4b70feede1
@ -6,7 +6,7 @@ cd data/gui
|
|||||||
l=""
|
l=""
|
||||||
for i in $(find . -iname "*.stkgui"); do
|
for i in $(find . -iname "*.stkgui"); do
|
||||||
s=$(basename $i)
|
s=$(basename $i)
|
||||||
x=$(find ../../src/states_screens -exec grep -H $s \{} \; | wc -l)
|
x=$(find ../../src/states_screens -type f -exec grep -H $s \{} \; | wc -l)
|
||||||
echo -n "."
|
echo -n "."
|
||||||
if [ $x == "0" ]; then
|
if [ $x == "0" ]; then
|
||||||
l="$l $i"
|
l="$l $i"
|
||||||
|
@ -39,7 +39,9 @@ def main():
|
|||||||
if statistics:
|
if statistics:
|
||||||
lines_total += len(lines)
|
lines_total += len(lines)
|
||||||
|
|
||||||
|
modified = False
|
||||||
for i in range(len(lines)):
|
for i in range(len(lines)):
|
||||||
|
oldLine = lines[i]
|
||||||
# replacing tabs with four spaces
|
# replacing tabs with four spaces
|
||||||
lines[i] = lines[i].replace("\t", " ")
|
lines[i] = lines[i].replace("\t", " ")
|
||||||
|
|
||||||
@ -48,6 +50,8 @@ def main():
|
|||||||
if statistics:
|
if statistics:
|
||||||
if lines[i].lstrip().startswith("//"):
|
if lines[i].lstrip().startswith("//"):
|
||||||
lines_code += 1
|
lines_code += 1
|
||||||
|
if not modified and oldLine != lines[i]:
|
||||||
|
modified = True
|
||||||
src_file.close()
|
src_file.close()
|
||||||
|
|
||||||
# writing back
|
# writing back
|
||||||
|
Loading…
Reference in New Issue
Block a user