mirror of
https://github.com/tuna/tunasync-scripts.git
synced 2025-04-20 04:12:42 +00:00
unify the size format
This commit is contained in:
parent
2e7e6150ed
commit
31ee06590b
@ -10,7 +10,8 @@ function update_repo_git() {
|
|||||||
echo "==== SYNC repo.git START ===="
|
echo "==== SYNC repo.git 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
|
||||||
git count-objects -v -H
|
sz=$(git count-objects -v|grep -Po '(?<=size-pack: )\d+')
|
||||||
|
echo "size-pack:" $(numfmt --to=iec $sz)
|
||||||
echo "==== SYNC repo.git DONE ===="
|
echo "==== SYNC repo.git DONE ===="
|
||||||
}
|
}
|
||||||
|
|
||||||
|
6
git.sh
6
git.sh
@ -1,5 +1,9 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
UPSTREAM=${TUNASYNC_UPSTREAM_URL:-"git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git"}
|
UPSTREAM=${TUNASYNC_UPSTREAM_URL}
|
||||||
|
if [[ -z "$UPSTREAM" ]];then
|
||||||
|
echo "Please set the TUNASYNC_UPSTREAM_URL"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
function repo_init() {
|
function repo_init() {
|
||||||
git clone --mirror $UPSTREAM $TUNASYNC_WORKING_DIR
|
git clone --mirror $UPSTREAM $TUNASYNC_WORKING_DIR
|
||||||
|
Loading…
x
Reference in New Issue
Block a user