-# Update helm-charts submdule needed later
-# ignore subproject commit and use latest remote version
-git -C "${IEC_PATH}" submodule update --init --remote "${HELM_CHARTS_PATH}"
-git -C "${IEC_PATH}/${HELM_CHARTS_PATH}" checkout "${HELM_CHARTS_REV}"
-
-test -d "${AUTO_TOOLS}" || git clone "${AUTO_TOOLS_REPO}" "${AUTO_TOOLS}"
-git -C "${AUTO_TOOLS}" checkout "${AUTO_TOOLS_REV}"
+if ! [ -d "${AUTO_TOOLS}" ] && ! [ -L "${AUTO_TOOLS}" ]
+then
+ git clone "${AUTO_TOOLS_REPO}" "${AUTO_TOOLS}"
+ (cd "${AUTO_TOOLS}"; git checkout "${AUTO_TOOLS_REV}")
+fi