Skip to content

Commit a606c46

Browse files
committedOct 26, 2017
Cleanup temporary files in prepare-commit.sh
1 parent 2383edb commit a606c46

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
@@ -68,6 +68,7 @@ astyleit() {
6868
scripts/doxygen_space.pl "$modified"
6969
diff "$1" "$modified" >/dev/null || mv "$modified" "$1"
7070
rm -f "$modified"
71+
rm -f "$modified.sortinc"
7172
}
7273

7374
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

0 commit comments

Comments
 (0)
Please sign in to comment.