fix variables

This commit is contained in:
Jakobus Schürz 2021-01-12 16:46:26 +01:00
parent b36d5c3632
commit e996ba02c3
2 changed files with 2 additions and 10 deletions

View file

@ -100,7 +100,7 @@ EOF
fi
else
local seconds=$(( $( date --date="@$(stat --printf %Y ${MSC_GIT_UPD_REPO_STATFILE} 2>/dev/null || echo 0 )" "+%s") - $(date --date="${MSC_GIT_REPO_UPDATE_INTERVALL-${MSC_GIT_REPO_UPDATE_INTERVALL_DEFAULT}} hours ago" "+%s") ))
logwarn "sync-intervall (${MSC_GIT_REPO_UPDATE_INTERVALL-${MSC_GIT_REPO_UPDATE_INTERVALL_DEFAULT}} hours) not reached yet. $((seconds/86400)) days $(date -d "1970-01-01 + $seconds seconds" "+%H hours %M minutes %S seconds") left."
logwarn "repo sync-intervall (${MSC_GIT_REPO_UPDATE_INTERVALL-${MSC_GIT_REPO_UPDATE_INTERVALL_DEFAULT}} hours) not reached yet. $((seconds/86400)) days $(date -d "1970-01-01 + $seconds seconds" "+%H hours %M minutes %S seconds") left."
return 2
fi
else
@ -111,13 +111,11 @@ EOF
}
lastupdatesubmodules () {
#date "+%s" > ${MSC_GIT_UPD_SUBMOD_STATFILE}
touch ${MSC_GIT_UPD_REPO_STATFILE}
touch ${MSC_GIT_UPD_SUBMOD_STATFILE}
}
export -f lastupdatesubmodules
lastupdaterepo () {
#date "+%s" > ${MSC_GIT_UPD_REPO_STATFILE}
touch ${MSC_GIT_UPD_REPO_STATFILE}
}
export -f lastupdaterepo

View file

@ -117,7 +117,6 @@ export HISTTIMEFORMAT='%F %T '
export HISTSIZE=999999
loginfo "bashrc_add sourced" 2>&1 |tee -a ${MSC_LOGFILE} >&2
#echo "bashrc_add sourced" >&2
# Export several functions for being usable in subshells
export -f token
@ -138,8 +137,3 @@ export -f reachable-default
[ -z "${SSH_AGENTS_DEFAULT_DIR+x}" ] || mkdir -p "${SSH_AGENTS_DEFAULT_DIR}"
#cat << EOF > "${SSH_AGENTS_DEFAULT_DIR}/agent-default-$(hostname)"
#SSH_AUTH_SOCK=${SSH_AUTH_SOCK}; export SSH_AUTH_SOCK;
#SSH_AGENT_PID=${SSH_AGENT_PID}; export SSH_AGENT_PID;
#loginfo Agent pid ${SSH_AGENT_PID};
#EOF