Skip to content

Commit

Permalink
Cleanup temporary files in prepare-commit.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Oct 26, 2017
1 parent 2383edb commit a606c46
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
1 change: 1 addition & 0 deletions scripts/astyle.sh
Expand Up @@ -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
Expand Down
11 changes: 4 additions & 7 deletions scripts/prepare-commit.sh
Expand Up @@ -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
Expand Down

0 comments on commit a606c46

Please sign in to comment.