Skip to content

Commit cfad3aa

Browse files
authoredMay 8, 2018
Merge pull request #5461 from m-kuhn/less_temp_files
Cleanup temporary files in prepare-commit.sh
2 parents cdca708 + a606c46 commit cfad3aa

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed
 

‎scripts/astyle.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ astyleit() {
8181
scripts/doxygen_space.pl "$modified"
8282
diff "$1" "$modified" >/dev/null || mv "$modified" "$1"
8383
rm -f "$modified"
84+
rm -f "$modified.sortinc"
8485
}
8586

8687
for f in "$@"; do

‎scripts/prepare-commit.sh

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -91,22 +91,19 @@ for f in $MODIFIED; do
9191

9292
cp $f $m
9393
ASTYLEPROGRESS=" [$i/$N]" astyle.sh $f
94-
if diff -u $m $f >>$ASTYLEDIFF; then
95-
# no difference found
96-
rm $m
97-
fi
94+
diff -u $m $f >>$ASTYLEDIFF
95+
rm $m
9896
done
9997

10098
if [ -s "$ASTYLEDIFF" ]; then
10199
if tty -s; then
102100
# review astyle changes
103101
colordiff <$ASTYLEDIFF | less -r
104102
else
105-
echo "Files changed (see $ASTYLEDIFF)"
103+
echo "Files changed"
106104
fi
107-
else
108-
rm $ASTYLEDIFF
109105
fi
106+
rm $ASTYLEDIFF
110107

111108

112109
# verify SIP files

3 commit comments

Comments
 (3)

3nids commented on May 28, 2018

@3nids
Member

@m-kuhn since this commit, I have to run prepare-commit in cycles (as soon as there is a change, it stops). Am I the only one?

m-kuhn commented on May 28, 2018

@m-kuhn
MemberAuthor

Revert please, also happens to me

3nids commented on May 28, 2018

@3nids
Member

done

Please sign in to comment.