mirror of
https://github.com/tuna/tunasync-scripts.git
synced 2025-04-19 11:42:43 +00:00
[git scripts] add --prune, update remotes/origin/HEAD
This commit is contained in:
parent
2da266497b
commit
633c7116dc
@ -13,7 +13,8 @@ function update_font_git() {
|
|||||||
repo_dir="$1"
|
repo_dir="$1"
|
||||||
cd "$repo_dir"
|
cd "$repo_dir"
|
||||||
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 -p
|
||||||
|
git remote set-head origin --auto
|
||||||
objs=$(find objects -type f | wc -l)
|
objs=$(find objects -type f | wc -l)
|
||||||
[[ "$objs" -gt 8 ]] && git repack -a -b -d
|
[[ "$objs" -gt 8 ]] && git repack -a -b -d
|
||||||
sz=$(git count-objects -v|grep -Po '(?<=size-pack: )\d+')
|
sz=$(git count-objects -v|grep -Po '(?<=size-pack: )\d+')
|
||||||
|
@ -11,7 +11,8 @@ function update_cocoapods_git() {
|
|||||||
repo_dir="$1"
|
repo_dir="$1"
|
||||||
cd $repo_dir
|
cd $repo_dir
|
||||||
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 -p
|
||||||
|
git remote set-head origin --auto
|
||||||
objs=$(find objects -type f | wc -l)
|
objs=$(find objects -type f | wc -l)
|
||||||
[[ "$objs" -gt 8 ]] && git repack -a -b -d
|
[[ "$objs" -gt 8 ]] && git repack -a -b -d
|
||||||
sz=$(git count-objects -v|grep -Po '(?<=size-pack: )\d+')
|
sz=$(git count-objects -v|grep -Po '(?<=size-pack: )\d+')
|
||||||
|
@ -8,7 +8,8 @@ function repo_init() {
|
|||||||
function update_repo_git() {
|
function update_repo_git() {
|
||||||
cd $TUNASYNC_WORKING_DIR
|
cd $TUNASYNC_WORKING_DIR
|
||||||
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 -p
|
||||||
|
git remote set-head origin --auto
|
||||||
git repack -a -b -d
|
git repack -a -b -d
|
||||||
sz=$(git count-objects -v|grep -Po '(?<=size-pack: )\d+')
|
sz=$(git count-objects -v|grep -Po '(?<=size-pack: )\d+')
|
||||||
sz=$(($sz*1024))
|
sz=$(($sz*1024))
|
||||||
|
3
git.sh
3
git.sh
@ -12,7 +12,8 @@ function repo_init() {
|
|||||||
function update_linux_git() {
|
function update_linux_git() {
|
||||||
cd $TUNASYNC_WORKING_DIR
|
cd $TUNASYNC_WORKING_DIR
|
||||||
echo "==== SYNC $UPSTREAM START ===="
|
echo "==== SYNC $UPSTREAM START ===="
|
||||||
/usr/bin/timeout -s INT 3600 git remote -v update
|
/usr/bin/timeout -s INT 3600 git remote -v update -p
|
||||||
|
git remote set-head origin --auto
|
||||||
objs=$(find objects -type f | wc -l)
|
objs=$(find objects -type f | wc -l)
|
||||||
[[ "$objs" -gt 8 ]] && git repack -a -b -d
|
[[ "$objs" -gt 8 ]] && git repack -a -b -d
|
||||||
sz=$(git count-objects -v|grep -Po '(?<=size-pack: )\d+')
|
sz=$(git count-objects -v|grep -Po '(?<=size-pack: )\d+')
|
||||||
|
@ -9,7 +9,8 @@ function update_homebrew_git() {
|
|||||||
repo_dir="$1"
|
repo_dir="$1"
|
||||||
cd $repo_dir
|
cd $repo_dir
|
||||||
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 -p
|
||||||
|
git remote set-head origin --auto
|
||||||
objs=$(find objects/ -type f | wc -l)
|
objs=$(find objects/ -type f | wc -l)
|
||||||
[[ "$objs" -gt 8 ]] && git repack -a -b -d
|
[[ "$objs" -gt 8 ]] && git repack -a -b -d
|
||||||
sz=$(git count-objects -v|grep -Po '(?<=size-pack: )\d+')
|
sz=$(git count-objects -v|grep -Po '(?<=size-pack: )\d+')
|
||||||
|
3
llvm.sh
3
llvm.sh
@ -9,7 +9,8 @@ function repo_update() {
|
|||||||
repo_dir="$1"
|
repo_dir="$1"
|
||||||
cd $repo_dir
|
cd $repo_dir
|
||||||
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 -p
|
||||||
|
git remote set-head origin --auto
|
||||||
objs=$(find objects/ -type f | wc -l)
|
objs=$(find objects/ -type f | wc -l)
|
||||||
[[ "$objs" -gt 8 ]] && git repack -a -b -d
|
[[ "$objs" -gt 8 ]] && git repack -a -b -d
|
||||||
sz=$(git count-objects -v|grep -Po '(?<=size-pack: )\d+')
|
sz=$(git count-objects -v|grep -Po '(?<=size-pack: )\d+')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user