mirror of
https://github.com/tuna/tunasync-scripts.git
synced 2025-04-20 04:12:42 +00:00
linux-stable.git
This commit is contained in:
parent
ebffba1a28
commit
c2e227e7ce
21
linux-stable.sh
Executable file
21
linux-stable.sh
Executable file
@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
UPSTREAM=${TUNASYNC_UPSTREAM_URL:-"git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git"}
|
||||||
|
|
||||||
|
function repo_init() {
|
||||||
|
git clone --mirror $UPSTREAM $TUNASYNC_WORKING_DIR
|
||||||
|
}
|
||||||
|
|
||||||
|
function update_linux_git() {
|
||||||
|
cd $TUNASYNC_WORKING_DIR
|
||||||
|
echo "==== SYNC linux.git START ===="
|
||||||
|
/usr/bin/timeout -s INT 3600 git remote -v update
|
||||||
|
git repack -a -b -d
|
||||||
|
echo "==== SYNC linux.git DONE ===="
|
||||||
|
}
|
||||||
|
|
||||||
|
if [[ ! -f "$TUNASYNC_WORKING_DIR/HEAD" ]]; then
|
||||||
|
echo "Initializing Linux.git mirror"
|
||||||
|
repo_init
|
||||||
|
fi
|
||||||
|
|
||||||
|
update_linux_git
|
Loading…
x
Reference in New Issue
Block a user