Merge pull request #5461 from m-kuhn/less_temp_files

Cleanup temporary files in prepare-commit.sh
This commit is contained in:
Matthias Kuhn 2018-05-08 10:35:15 +02:00 committed by GitHub
commit cfad3aa560
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 7 deletions

View File

@ -81,6 +81,7 @@ astyleit() {
scripts/doxygen_space.pl "$modified" scripts/doxygen_space.pl "$modified"
diff "$1" "$modified" >/dev/null || mv "$modified" "$1" diff "$1" "$modified" >/dev/null || mv "$modified" "$1"
rm -f "$modified" rm -f "$modified"
rm -f "$modified.sortinc"
} }
for f in "$@"; do for f in "$@"; do

View File

@ -91,10 +91,8 @@ for f in $MODIFIED; do
cp $f $m cp $f $m
ASTYLEPROGRESS=" [$i/$N]" astyle.sh $f ASTYLEPROGRESS=" [$i/$N]" astyle.sh $f
if diff -u $m $f >>$ASTYLEDIFF; then diff -u $m $f >>$ASTYLEDIFF
# no difference found rm $m
rm $m
fi
done done
if [ -s "$ASTYLEDIFF" ]; then if [ -s "$ASTYLEDIFF" ]; then
@ -102,11 +100,10 @@ if [ -s "$ASTYLEDIFF" ]; then
# review astyle changes # review astyle changes
colordiff <$ASTYLEDIFF | less -r colordiff <$ASTYLEDIFF | less -r
else else
echo "Files changed (see $ASTYLEDIFF)" echo "Files changed"
fi fi
else
rm $ASTYLEDIFF
fi fi
rm $ASTYLEDIFF
# verify SIP files # verify SIP files