mirror of
https://github.com/tuna/tunasync-scripts.git
synced 2025-04-20 12:42:50 +00:00
calculate the size adobe-fonts
This commit is contained in:
parent
f9aaac4a70
commit
00b4d52d9a
@ -15,6 +15,8 @@ function update_font_git() {
|
|||||||
echo "==== SYNC $repo_dir START ===="
|
echo "==== SYNC $repo_dir START ===="
|
||||||
/usr/bin/timeout -s INT 3600 git remote -v update
|
/usr/bin/timeout -s INT 3600 git remote -v update
|
||||||
git repack -a -b -d
|
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 ===="
|
echo "==== SYNC $repo_dir DONE ===="
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -33,6 +35,7 @@ function checkout_font_branch() {
|
|||||||
|
|
||||||
UPSTREAM_BASE=${TUNASYNC_UPSTREAM_URL:-"https://github.com/adobe-fonts"}
|
UPSTREAM_BASE=${TUNASYNC_UPSTREAM_URL:-"https://github.com/adobe-fonts"}
|
||||||
REPOS=("source-code-pro" "source-sans-pro" "source-serif-pro" "source-han-sans" "source-han-serif")
|
REPOS=("source-code-pro" "source-sans-pro" "source-serif-pro" "source-han-sans" "source-han-serif")
|
||||||
|
total_size=0
|
||||||
|
|
||||||
for repo in ${REPOS[@]}; do
|
for repo in ${REPOS[@]}; do
|
||||||
if [[ ! -d "$TUNASYNC_WORKING_DIR/${repo}.git" ]]; then
|
if [[ ! -d "$TUNASYNC_WORKING_DIR/${repo}.git" ]]; then
|
||||||
@ -42,3 +45,5 @@ for repo in ${REPOS[@]}; do
|
|||||||
update_font_git "$TUNASYNC_WORKING_DIR/${repo}.git"
|
update_font_git "$TUNASYNC_WORKING_DIR/${repo}.git"
|
||||||
checkout_font_branch "$TUNASYNC_WORKING_DIR/${repo}.git" "$TUNASYNC_WORKING_DIR/${repo}" "release"
|
checkout_font_branch "$TUNASYNC_WORKING_DIR/${repo}.git" "$TUNASYNC_WORKING_DIR/${repo}" "release"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
echo "Total size is" $(numfmt --to=iec $total_size)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user