move function, add timestamp on initial clone

This commit is contained in:
Jakobus Schürz 2020-12-14 13:59:03 +01:00
parent 0925848e5f
commit 9233124e69
3 changed files with 13 additions and 6 deletions

View file

@ -103,6 +103,16 @@ EOF
} }
lastupdatesubmodules () {
date "+%s" > ${MSC_BASE%/}${MSC_BASE:+/}.last_update_submodules
}
export -f lastupdatesubmodules
lastupdaterepo () {
date "+%s" > ${MSC_BASE%/}${MSC_BASE:+/}.last_update_repo
}
export -f lastupdaterepo
sync_config () { sync_config () {
if $MSC_GIT_SYNC; then if $MSC_GIT_SYNC; then
local nok="" local nok=""

View file

@ -20,12 +20,7 @@
[ -z "${MSC_GIT_REMOTE_NAME+x}" ] && export MSC_GIT_REMOTE_NAME=origin [ -z "${MSC_GIT_REMOTE_NAME+x}" ] && export MSC_GIT_REMOTE_NAME=origin
[ -z "${MSC_GIT_BRANCH+x}" ] && export MSC_GIT_BRANCH=master [ -z "${MSC_GIT_BRANCH+x}" ] && export MSC_GIT_BRANCH=master
lastupdatesubmodules () {
date "+%s" > ${MSC_BASE%/}${MSC_BASE:+/}.last_update_submodules
}
lastupdaterepo () {
date "+%s" > ${MSC_BASE%/}${MSC_BASE:+/}.last_update_repo
}
gitupdateend() { gitupdateend() {
cat << EOF >> "${MSC_LOGFILE}" cat << EOF >> "${MSC_LOGFILE}"

View file

@ -334,6 +334,8 @@ sshmyshellconfig() {
rm -rf ~/server-config && echo rm -rf ~/server-config rm -rf ~/server-config && echo rm -rf ~/server-config
loginfo git clone loginfo git clone
git clone --recurse-submodules $MSC_GIT_REMOTE \${HOME}/${MSC_SUBPATH} git clone --recurse-submodules $MSC_GIT_REMOTE \${HOME}/${MSC_SUBPATH}
date "+%s" > ${MSC_BASE%/}${MSC_BASE:+/}.last_update_submodules
date "+%s" > ${MSC_BASE%/}${MSC_BASE:+/}.last_update_repo
EOF EOF
EXIT EXIT