diff options
Diffstat (limited to 'debian/_buildscripts/local/update_repositories.sh')
-rwxr-xr-x | debian/_buildscripts/local/update_repositories.sh | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/debian/_buildscripts/local/update_repositories.sh b/debian/_buildscripts/local/update_repositories.sh index 934a5a1b1..57305c59d 100755 --- a/debian/_buildscripts/local/update_repositories.sh +++ b/debian/_buildscripts/local/update_repositories.sh @@ -35,7 +35,8 @@ for ((idx=1; idx<=$#; idx++)); do done # Load common code -. ./internals/_build_common.sh +export SCRIPT_DIR=$(dirname $(readlink -f "$0")) +. ${SCRIPT_DIR}/internals/_build_common.sh init_common UPDATE_LOCK_FILENAME="/var/lock/TDE_update_repo_lock" # Lock file for incremental update @@ -282,6 +283,12 @@ function _do_worktree_update() git branch -u "origin/${CURR_BR}" &>/dev/null #$ git reset --hard "origin/${CURR_BR}" &>/dev/null fi + # If this is a clone of a local repository, make sure to do a fetch + # operation first, otherwise this clone won't see the latest changes + if [ "`git config --get remote.origin.url`" = "${MOD_REPO_PATH}" ]; then + eval git fetch --all --prune $GIT_NO_RECURSE_SUBMODULES $OPT_VERBOSE_LOG + eval git worktree prune $OPT_VERBOSE_LOG + fi # Update eval git reset --hard HEAD $OPT_VERBOSE_LOG eval git clean -dxff $OPT_VERBOSE_LOG |