Skip to content
Permalink
Browse files

Merge pull request #5461 from m-kuhn/less_temp_files

Cleanup temporary files in prepare-commit.sh
  • Loading branch information
m-kuhn committed May 8, 2018
2 parents cdca708 + a606c46 commit cfad3aa560c2d11e5271fc2ac64d82aba9f7b5a0
Showing with 5 additions and 7 deletions.
  1. +1 −0 scripts/astyle.sh
  2. +4 −7 scripts/prepare-commit.sh
@@ -81,6 +81,7 @@ astyleit() {
scripts/doxygen_space.pl "$modified"
diff "$1" "$modified" >/dev/null || mv "$modified" "$1"
rm -f "$modified"
rm -f "$modified.sortinc"
}

for f in "$@"; do
@@ -91,22 +91,19 @@ for f in $MODIFIED; do

cp $f $m
ASTYLEPROGRESS=" [$i/$N]" astyle.sh $f
if diff -u $m $f >>$ASTYLEDIFF; then
# no difference found
rm $m
fi
diff -u $m $f >>$ASTYLEDIFF
rm $m
done

if [ -s "$ASTYLEDIFF" ]; then
if tty -s; then
# review astyle changes
colordiff <$ASTYLEDIFF | less -r
else
echo "Files changed (see $ASTYLEDIFF)"
echo "Files changed"
fi
else
rm $ASTYLEDIFF
fi
rm $ASTYLEDIFF


# verify SIP files

3 comments on commit cfad3aa

@3nids

This comment has been minimized.

Copy link
Member

@3nids 3nids replied May 28, 2018

@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

This comment has been minimized.

Copy link
Member Author

@m-kuhn m-kuhn replied May 28, 2018

Revert please, also happens to me

@3nids

This comment has been minimized.

Copy link
Member

@3nids 3nids replied May 28, 2018

done

Please sign in to comment.
You can’t perform that action at this time.