OSX needs special treatment
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
0db8718c3d
commit
75f9328088
1 changed files with 4 additions and 1 deletions
|
@ -22,9 +22,12 @@ if ! ( ping -q -c 1 8.8.8.8 >/dev/null ); then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
STAT_PARM="-c %Y"
|
||||||
|
[[ "$(uname -s)" = "Darwin" ]] && STAT_PARM="-f %m"
|
||||||
|
|
||||||
# Check repos for updates
|
# Check repos for updates
|
||||||
for REPO in ${REPOS[@]}; do
|
for REPO in ${REPOS[@]}; do
|
||||||
if [ $(( $(date +%s) - $(stat -c %Y .cfg/${REPO}/FETCH_HEAD) )) -lt ${FETCH_INTERVAL} ]; then
|
if [ $(( $(date +%s) - $(stat ${STAT_PARM} .cfg/${REPO}/FETCH_HEAD) )) -lt ${FETCH_INTERVAL} ]; then
|
||||||
debug "Last repo fetch for '${REPO}' too new, not checking"
|
debug "Last repo fetch for '${REPO}' too new, not checking"
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue