From 964e22659a594c9c44918c91c2cd5575c819c05f Mon Sep 17 00:00:00 2001 From: z4yx Date: Sat, 21 Mar 2020 10:55:34 +0800 Subject: [PATCH] fix the unit --- git-repo.sh | 1 + git.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/git-repo.sh b/git-repo.sh index 6e5cab0..f5b3b3d 100755 --- a/git-repo.sh +++ b/git-repo.sh @@ -11,6 +11,7 @@ function update_repo_git() { /usr/bin/timeout -s INT 3600 git remote -v update 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 "==== SYNC repo.git DONE ====" } diff --git a/git.sh b/git.sh index 341fd8b..7ceaf01 100755 --- a/git.sh +++ b/git.sh @@ -15,6 +15,7 @@ function update_linux_git() { /usr/bin/timeout -s INT 3600 git remote -v update 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 "==== SYNC $UPSTREAM DONE ====" }