git: change output format of calc-ed size

This commit is contained in:
Miao Wang 2021-07-07 01:43:42 +08:00
parent 7186980db9
commit 59d3bfaf3e
2 changed files with 2 additions and 2 deletions

View File

@ -15,7 +15,7 @@ function update_repo_git() {
git repack -a -b -d
sz=$(git count-objects -v|grep -Po '(?<=size-pack: )\d+')
sz=$(($sz*1024))
echo "size-pack:" $(numfmt --to=iec $sz)
echo "Total size is" $(numfmt --to=iec $sz)
echo "==== SYNC repo.git DONE ===="
}

2
git.sh
View File

@ -22,7 +22,7 @@ function update_linux_git() {
[[ "$objs" -gt 8 ]] && git repack -a -b -d
sz=$(git count-objects -v|grep -Po '(?<=size-pack: )\d+')
sz=$(($sz*1024))
echo "size-pack:" $(numfmt --to=iec $sz)
echo "Total size is" $(numfmt --to=iec $sz)
echo "==== SYNC $UPSTREAM DONE ===="
return $ret
}