3 # Provide another place for $Girocco::Config::autogchack to happen
5 # Beware, we MAY be running in a chroot!
7 # If GIROCCO_SUPPRESS_AUTO_GC_UPDATE immediately exit
8 [ "${GIROCCO_SUPPRESS_AUTO_GC_UPDATE:-0}" = "0" ] ||
exit 0
10 # If we're in the chroot immediately exit
11 [ -x @perlbin@
] ||
exit 0
17 # Make sure the current directory is where we expect to be
18 [ "${GIT_DIR+set}" != "set" ] ||
{ [ -n "$GIT_DIR" ] && [ -d "$GIT_DIR" ]; } ||
unset GIT_DIR
19 [ -n "$GIT_DIR" ] || GIT_DIR
="$(git rev-parse --git-dir)"
20 [ -n "$GIT_DIR" ] && cd -P "${GIT_DIR:-.}" ||
exit 1
21 case "${PWD%/*}" in */worktrees
)
24 # But it COULD just be a coincidence...
25 [ -s commondir
] && [ -s HEAD
] &&
26 _cmndir
= && read -r _cmndir
<commondir
2>/dev
/null
&&
27 [ -n "$_cmndir" ] && [ -d "$_cmndir" ]
29 # ...it is not, fix it!
30 cd -P "$_cmndir" ||
exit 1
33 GIT_DIR
="." GIT_PREFIX
= && export GIT_DIR
36 case "$PWD" in *?
/mob
)
38 GIROCCO_PERSONAL_MOB
=1
47 unset GIROCCO_SUPPRESS_AUTO_GC_UPDATE
48 .
"$cfg_basedir/jobd/generate-auto-gc-update.sh"
49 generate_auto_gc_update
51 # if there's been a commit, the cache is definitely outdated
52 # we always do this now in case the autogchack is not active
53 ! [ -d htmlcache
] ||
{ >htmlcache
/changed
; } 2>/dev
/null ||
: