clone.sh: Extract function clone_repo_to_share_folder()

This patch extracts function clone_repo_to_share_folder() in clone.sh to
keep the code easy to maintain.

Signed-off-by: Xinyu Zhang <xinyu.zhang@arm.com>
Change-Id: I1473918bc424af8f6980e76d89666bd40fb4220a
1 file changed