From c21039646cf394053ea88c9a3cce37adeb2aa0dc Mon Sep 17 00:00:00 2001 From: Nathan Broadbent Date: Sun, 18 Dec 2011 02:03:13 +0800 Subject: [PATCH] Added example cron config to keep all local repos up-to-date automatically [ci skip] --- lib/git/repo_index.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/git/repo_index.sh b/lib/git/repo_index.sh index 7ffe126..fd8cc77 100644 --- a/lib/git/repo_index.sh +++ b/lib/git/repo_index.sh @@ -244,6 +244,8 @@ _git_index_update_all_branches() { } # Updates all git repositories with clean working directories. +# Use the following cron configuration: +# */6 * * * * /usr/bin/bash -c '. $HOME/.bashrc && git_index --update-all' function _git_index_update_all() { echo -e "== Safely updating all local branches in $_bld_col$(_git_index_count)$_txt_col repos...\n" _git_index_batch_cmd _git_index_update_all_branches