mirror of
https://github.com/tuna/tunasync-scripts.git
synced 2025-06-30 23:12:45 +00:00
avoid repacking every time
This commit is contained in:
parent
00bc5bd38b
commit
d1be4c0fbe
@ -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 ===="
|
||||
|
@ -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 ===="
|
||||
|
Loading…
x
Reference in New Issue
Block a user