fix variables
This commit is contained in:
parent
13478adf5c
commit
2c2222557a
2 changed files with 6 additions and 3 deletions
|
@ -86,10 +86,13 @@ EOF
|
|||
ckrepo () {
|
||||
# check if remote repo is reachable
|
||||
if [ ${MSC_GIT_SYNC-$MSC_GIT_REPO_UPDATE} -a $(stat --printf %Y ${MSC_GIT_UPD_REPO_STATFILE} 2>/dev/null || echo 0 ) \
|
||||
-lt $(date --date="${MSC_GIT_REPO_UPDATE_INTERVALL-0} hours ago" "+%s") ]; then
|
||||
-lt $(date --date="${MSC_GIT_REPO_UPDATE_INTERVALL-${MSC_GIT_REPO_UPDATE_INTERVALL_DEFAULT}} hours ago" "+%s") ]; then
|
||||
logwarn "check if reachable"
|
||||
if $( timeout --foreground "${MSC_GIT_TIMEOUT-$MSC_GIT_TIMEOUT_DEFAULT}" $SGIT ls-remote >/dev/null 2>&1) ;then
|
||||
logwarn "reachable"
|
||||
return 0
|
||||
else
|
||||
logwarn "not reachable"
|
||||
return 1
|
||||
fi
|
||||
else
|
||||
|
|
|
@ -66,13 +66,13 @@ done
|
|||
[ -z "${MSC_GIT_UPD_REPO_STATFILE+x}" ] && export MSC_GIT_UPD_REPO_STATFILE="${MSC_BASE%/}${MSC_BASE:+/}.last_update_repo"
|
||||
|
||||
if [ $(stat --printf %Y ${MSC_GIT_UPD_SUBMOD_STATFILE} 2>/dev/null || echo 0 ) \
|
||||
-lt $(date --date="${MSC_GIT_SUBMODULES_UPDATE_INTERVALL} hours ago" "+%s") \
|
||||
-lt $(date --date="${MSC_GIT_SUBMODULES_UPDATE_INTERVALL-${MSC_GIT_SUBMODULES_UPDATE_INTERVALL_DEFAULT}} hours ago" "+%s") \
|
||||
-a ${MSC_GIT_SUBMODULES_UPDATE-${MSC_GIT_SUBMODULES_UPDATE_DEFAULT-true}} ]; then
|
||||
[ -z "${dosrepoupdate+x}" ] && dorepoupdate="true"
|
||||
fi
|
||||
|
||||
if [ $(stat --printf %Y ${MSC_GIT_UPD_REPO_STATFILE} 2>/dev/null || echo 0 ) \
|
||||
-lt $(date --date="${MSC_GIT_REPO_UPDATE_INTERVALL} hours ago" "+%s") \
|
||||
-lt $(date --date="${MSC_GIT_REPO_UPDATE_INTERVALL-${MSC_GIT_REPO_UPDATE_INTERVALL_DEFAULT}} hours ago" "+%s") \
|
||||
-a ${MSC_GIT_REPO_UPDATE-${MSC_GIT_REPO_UPDATE_DEFAULT-true}} ]; then
|
||||
[ -z "${dosubmodupdate+x}" ] && dosubmodupdate="true"
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue