diff --git a/adobe-fonts.sh b/adobe-fonts.sh index 6714d14..e6c435f 100755 --- a/adobe-fonts.sh +++ b/adobe-fonts.sh @@ -14,7 +14,8 @@ function update_font_git() { cd "$repo_dir" echo "==== SYNC $repo_dir START ====" /usr/bin/timeout -s INT 3600 git remote -v update - git repack -a -b -d + objs=$(find objects -type f | wc -l) + [[ "$objs" -gt 8 ]] && git repack -a -b -d sz=$(git count-objects -v|grep -Po '(?<=size-pack: )\d+') total_size=$(($total_size+1024*$sz)) echo "==== SYNC $repo_dir DONE ====" diff --git a/cocoapods.sh b/cocoapods.sh index 0d4a35c..7a683ab 100755 --- a/cocoapods.sh +++ b/cocoapods.sh @@ -12,7 +12,8 @@ function update_cocoapods_git() { cd $repo_dir echo "==== SYNC $repo_dir START ====" /usr/bin/timeout -s INT 3600 git remote -v update - git repack -a -b -d + objs=$(find objects -type f | wc -l) + [[ "$objs" -gt 8 ]] && git repack -a -b -d sz=$(git count-objects -v|grep -Po '(?<=size-pack: )\d+') total_size=$(($total_size+1024*$sz)) echo "==== SYNC $repo_dir DONE ===="