Skip to content
Permalink
Browse files

Cleanup temporary files in prepare-commit.sh

  • Loading branch information
m-kuhn committed Oct 26, 2017
1 parent 2383edb commit a606c4685f840c4f2c2a999d0dea013db2bc60aa
Showing with 5 additions and 7 deletions.
  1. +1 −0 scripts/astyle.sh
  2. +4 −7 scripts/prepare-commit.sh
@@ -68,6 +68,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

0 comments on commit a606c46

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