1) Previous commit removed a shell function by mistake, that is being
referenced by "clone-source". Restore this function.
2) Make sure "with_retries" works correctly when "set -e" is in effect
Story: 2010226
Task: 48064
TESTS
==========================
Run "clone-source" and make sure it works
Signed-off-by: Davlet Panech <davlet.panech@windriver.com>
Change-Id: I1bbf4bf041305860d2c8db83f5130f424084255c