From 153164d7240d8ed07711b13dd51b2316376c8649 Mon Sep 17 00:00:00 2001 From: Harry Chen Date: Tue, 23 Jan 2018 17:19:57 +0800 Subject: [PATCH] Add linux-next.git Signed-off-by: Harry Chen --- linux-next.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 linux-next.sh diff --git a/linux-next.sh b/linux-next.sh new file mode 100755 index 0000000..ce99ccd --- /dev/null +++ b/linux-next.sh @@ -0,0 +1,21 @@ +#!/bin/bash +UPSTREAM=${TUNASYNC_UPSTREAM_URL:-"git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git"} + +function repo_init() { + git clone --mirror $UPSTREAM $TUNASYNC_WORKING_DIR +} + +function update_linux_git() { + cd $TUNASYNC_WORKING_DIR + echo "==== SYNC linux-next.git START ====" + /usr/bin/timeout -s INT 3600 git remote -v update + git repack -a -b -d + echo "==== SYNC linux-next.git DONE ====" +} + +if [[ ! -f "$TUNASYNC_WORKING_DIR/HEAD" ]]; then + echo "Initializing linux-next.git mirror" + repo_init +fi + +update_linux_git