Avoid division by zero in the rare case that portsnap needs to fetch
zero patches. (This avoids two "dc: divide by zero" warnings.) MFC after: 3 days
This commit is contained in:
parent
1e64280173
commit
5b3b877f89
@ -619,8 +619,10 @@ fetch_progress() {
|
||||
|
||||
pct_fmt()
|
||||
{
|
||||
printf " \r"
|
||||
printf "($1/$2) %02.2f%% " `echo "scale=4;$LNC / $TOTAL * 100"|bc`
|
||||
if [ $TOTAL -gt 0 ]; then
|
||||
printf " \r"
|
||||
printf "($1/$2) %02.2f%% " `echo "scale=4;$LNC / $TOTAL * 100"|bc`
|
||||
fi
|
||||
}
|
||||
|
||||
fetch_progress_percent() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user