Update update-components.sh

This commit is contained in:
me-no-dev 2021-06-08 10:34:20 +03:00
parent b6a46e7509
commit ac03d2af3d

View file

@ -13,6 +13,10 @@ TINYUSB_REPO_URL="https://github.com/hathach/tinyusb.git"
# CLONE/UPDATE ARDUINO
#
if [ ! -d "$AR_COMPS/arduino" ]; then
git clone $AR_REPO_URL "$AR_COMPS/arduino"
fi
if [ -z $AR_BRANCH ]; then
has_ar_branch=`git_branch_exists "$AR_COMPS/arduino" "idf-$IDF_BRANCH"`
if [ "$has_ar_branch" == "1" ]; then
@ -25,11 +29,8 @@ if [ -z $AR_BRANCH ]; then
fi
fi
if [ ! -d "$AR_COMPS/arduino" ]; then
git clone $AR_REPO_URL "$AR_COMPS/arduino"
if [ "$AR_BRANCH" ]; then
git -C "$AR_COMPS/arduino" checkout "$AR_BRANCH"
fi
if [ "$AR_BRANCH" ]; then
git -C "$AR_COMPS/arduino" checkout "$AR_BRANCH"
fi
if [ $? -ne 0 ]; then exit 1; fi