Navigation Menu

Skip to content

Commit

Permalink
Merge pull request #5461 from m-kuhn/less_temp_files
Browse files Browse the repository at this point in the history
Cleanup temporary files in prepare-commit.sh
  • Loading branch information
m-kuhn committed May 8, 2018
2 parents cdca708 + a606c46 commit cfad3aa
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 @@ -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
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

3 comments on commit cfad3aa

@3nids
Copy link
Member

@3nids 3nids commented on cfad3aa May 28, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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
Copy link
Member Author

@m-kuhn m-kuhn commented on cfad3aa May 28, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert please, also happens to me

@3nids
Copy link
Member

@3nids 3nids commented on cfad3aa May 28, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Please sign in to comment.