Skip to content

Commit

Permalink
Always clean the old git repo
Browse files Browse the repository at this point in the history
  • Loading branch information
arjunsuresh committed Aug 17, 2024
1 parent 6d57f8d commit 355c171
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion script/get-git-repo/customize.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def preprocess(i):
git_clone_cmd = "git clone " + env['CM_GIT_RECURSE_SUBMODULES'] + git_checkout_string + " " + env['CM_GIT_URL'] + " " + env.get('CM_GIT_DEPTH','') + ' ' + env['CM_GIT_CHECKOUT_FOLDER']

env['CM_GIT_CLONE_CMD'] = git_clone_cmd
env['CM_TMP_GIT_PATH'] = os.path.join(os.getcwd(), env['CM_GIT_CHECKOUT_FOLDER'], ".git")
env['CM_TMP_GIT_PATH'] = os.path.join(os.getcwd(), env['CM_GIT_CHECKOUT_FOLDER'], ".gitdone")

return {'return':0}

Expand Down
2 changes: 1 addition & 1 deletion script/get-git-repo/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ echo "$CUR_DIR"
SCRIPT_DIR=${CM_TMP_CURRENT_SCRIPT_PATH}

folder=${CM_GIT_CHECKOUT_FOLDER}
if [ ! -d "${CM_TMP_GIT_PATH}" || 1 ]; then
if [ ! -e "${CM_TMP_GIT_PATH}" ]; then
rm -rf ${folder}
echo "******************************************************"
echo "Current directory: ${CUR_DIR}"
Expand Down

0 comments on commit 355c171

Please sign in to comment.