3 # repod - Perform Girocco maintenance jobs
5 # repod is Girocco repositories maintenance servant; it periodically
6 # checks all the repositories and updates mirrored repositories and
7 # repacks push-repositories when needed.
9 # Execute with parameter --all-once to run only once (on all projects)
10 # instead of in infinite loop. Or call with parameter --one and name
11 # of a project (not full path, without .git suffix) to run maintenance
12 # only on that particular project.
20 if [ -e /tmp
/repod.lock
]; then
21 echo "Locked! Stale /tmp/repod.lock?" >&2
24 echo $$
>/tmp
/repod.lock
25 trap "rm /tmp/repod.lock" SIGINT SIGTERM EXIT
28 ## Single-project routine
33 if [ ! -e "$proj.git"/.nofetch
]; then
34 "$cfg_basedir"/daemons
/update.sh
"$proj"
36 "$cfg_basedir"/jobs
/gc.sh
"$proj" 2>&1 |
grep -v '^Pack.*created\.$'
44 get_repo_list |
while read proj
; do
45 check_one_proj
"$proj"
63 echo "Usage: $0 [--all-once | --one PRJNAME]" >&2