Improve scripts

This commit is contained in:
Flakebi 2014-06-04 17:56:09 +02:00
parent d7b3e0f46a
commit 4b70feede1
2 changed files with 5 additions and 1 deletions

View File

@ -6,7 +6,7 @@ cd data/gui
l=""
for i in $(find . -iname "*.stkgui"); do
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 "."
if [ $x == "0" ]; then
l="$l $i"

View File

@ -39,7 +39,9 @@ def main():
if statistics:
lines_total += len(lines)
modified = False
for i in range(len(lines)):
oldLine = lines[i]
# replacing tabs with four spaces
lines[i] = lines[i].replace("\t", " ")
@ -48,6 +50,8 @@ def main():
if statistics:
if lines[i].lstrip().startswith("//"):
lines_code += 1
if not modified and oldLine != lines[i]:
modified = True
src_file.close()
# writing back