File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -81,8 +81,16 @@ while true; do
8181 break
8282 fi
8383 fi
84- if [[ ! -d O2DPG ]]; then git clone https://github.com/AliceO2Group/O2DPG.git 1>&2 || { echo O2DPG checkout failed 1>&2 ; exit 1; }; fi
85- cd O2DPG
84+ for CHECKOUTATTEMPT in 1 2; do
85+ if [[ ! -d O2DPG ]]; then git clone https://github.com/AliceO2Group/O2DPG.git 1>&2 || { echo O2DPG checkout failed 1>&2 ; exit 1; }; fi
86+ cd O2DPG
87+ rm -f DATA/core_dump_*
88+ git reset --hard HEAD & > /dev/null && git clean -d -f & > /dev/null && break
89+ [[ $CHECKOUTATTEMPT -eq 2 ]] && { echo git reset error 1>&2 ; exit 1; }
90+ echo " Clean-up of O2DPG repository failed. Removing repository and cloning it from scratch" 1>&2
91+ cd $GEN_TOPO_WORKDIR || { echo Cannot enter work dir 1>&2 ; exit 1; }
92+ rm -rf O2DPG
93+ done
8694 git checkout $GEN_TOPO_SOURCE & > /dev/null
8795 if [[ $? != 0 ]]; then
8896 git fetch --tags origin 1>&2 || { echo Repository update failed 1>&2 ; exit 1; }
You can’t perform that action at this time.
0 commit comments