From 9233124e69b8ab8f80c28f057d208db8838e739c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakobus=20Sch=C3=BCrz?= Date: Mon, 14 Dec 2020 13:59:03 +0100 Subject: [PATCH] move function, add timestamp on initial clone --- bashrc_add | 10 ++++++++++ bin/git-myshellconfig-checkout | 7 +------ functions.sh | 2 ++ 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/bashrc_add b/bashrc_add index ce75612..24f8671 100755 --- a/bashrc_add +++ b/bashrc_add @@ -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 () { if $MSC_GIT_SYNC; then local nok="" diff --git a/bin/git-myshellconfig-checkout b/bin/git-myshellconfig-checkout index d75dd98..0313c70 100755 --- a/bin/git-myshellconfig-checkout +++ b/bin/git-myshellconfig-checkout @@ -20,12 +20,7 @@ [ -z "${MSC_GIT_REMOTE_NAME+x}" ] && export MSC_GIT_REMOTE_NAME=origin [ -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() { cat << EOF >> "${MSC_LOGFILE}" diff --git a/functions.sh b/functions.sh index 6c1d9e5..37ae1f8 100755 --- a/functions.sh +++ b/functions.sh @@ -334,6 +334,8 @@ sshmyshellconfig() { rm -rf ~/server-config && echo rm -rf ~/server-config loginfo git clone 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 EXIT