Skip to content

Commit 3295de1

Browse files
committed
improve cloning
1 parent b01967a commit 3295de1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

all-projects.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,11 +230,13 @@ cloneFetch() {
230230
(
231231
if [[ ! -d ".git" ]]; then
232232
printf "# %-30s - cloning...\n" "$repo"
233+
rm -rf TMP_GIT
233234
GIT_TERMINAL_PROMPT=0 git clone https://github.com/ModelingValueGroup/$repo.git TMP_GIT >/dev/null 2>&1 || :
234-
if [[ -d ".git" ]]; then
235+
if [[ -d "TMP_GIT/.git" ]]; then
235236
cp -R TMP_GIT/. .
236237
rm -rf TMP_GIT
237238
if [[ "$(listRemoteBranches | tr ' ' '\n' | egrep '^d$')" ]]; then
239+
printf "# %-30s - switching to develop branch...\n" "$repo" 1>&2
238240
git checkout develop >/dev/null 2>&1 || :
239241
fi
240242
fi

0 commit comments

Comments
 (0)