Skip to content

Commit ac03d2a

Browse files
committed
Update update-components.sh
1 parent b6a46e7 commit ac03d2a

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

tools/update-components.sh

+6-5
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ TINYUSB_REPO_URL="https://github.com/hathach/tinyusb.git"
1313
# CLONE/UPDATE ARDUINO
1414
#
1515

16+
if [ ! -d "$AR_COMPS/arduino" ]; then
17+
git clone $AR_REPO_URL "$AR_COMPS/arduino"
18+
fi
19+
1620
if [ -z $AR_BRANCH ]; then
1721
has_ar_branch=`git_branch_exists "$AR_COMPS/arduino" "idf-$IDF_BRANCH"`
1822
if [ "$has_ar_branch" == "1" ]; then
@@ -25,11 +29,8 @@ if [ -z $AR_BRANCH ]; then
2529
fi
2630
fi
2731

28-
if [ ! -d "$AR_COMPS/arduino" ]; then
29-
git clone $AR_REPO_URL "$AR_COMPS/arduino"
30-
if [ "$AR_BRANCH" ]; then
31-
git -C "$AR_COMPS/arduino" checkout "$AR_BRANCH"
32-
fi
32+
if [ "$AR_BRANCH" ]; then
33+
git -C "$AR_COMPS/arduino" checkout "$AR_BRANCH"
3334
fi
3435
if [ $? -ne 0 ]; then exit 1; fi
3536

0 commit comments

Comments
 (0)