Skip to content

Commit ff25790

Browse files
committed
fix build scripts
1 parent 3eb9cb0 commit ff25790

File tree

2 files changed

+35
-27
lines changed

2 files changed

+35
-27
lines changed

tools/install-esp-idf.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ if [ ! -d "$IDF_PATH" ]; then
1616
echo "ESP-IDF is not installed! Installing local copy"
1717
git clone $IDF_REPO_URL -b $IDF_BRANCH
1818
idf_was_installed="1"
19+
else
20+
git -C "$IDF_PATH" fetch
21+
git -C "$IDF_PATH" reset --hard
1922
fi
2023

2124
if [ "$IDF_COMMIT" ]; then

tools/update-components.sh

Lines changed: 32 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#/bin/bash
22

3+
set -e
34
source ./tools/config.sh
45

56
CAMERA_REPO_URL="https://github.com/espressif/esp32-camera.git"
@@ -16,6 +17,9 @@ TINYUSB_REPO_URL="https://github.com/hathach/tinyusb.git"
1617
echo "Updating ESP32 Arduino..."
1718
if [ ! -d "$AR_COMPS/arduino" ]; then
1819
git clone $AR_REPO_URL "$AR_COMPS/arduino"
20+
else
21+
git -C "$AR_COMPS/arduino" fetch
22+
git -C "$AR_COMPS/arduino" reset --hard
1923
fi
2024

2125
if [ -z $AR_BRANCH ]; then
@@ -46,11 +50,9 @@ if [ -z $AR_BRANCH ]; then
4650
fi
4751

4852
if [ "$AR_BRANCH" ]; then
49-
git -C "$AR_COMPS/arduino" checkout "$AR_BRANCH" && \
50-
git -C "$AR_COMPS/arduino" fetch && \
51-
git -C "$AR_COMPS/arduino" pull --ff-only
53+
git -C "$AR_COMPS/arduino" checkout "$AR_BRANCH"
5254
fi
53-
if [ $? -ne 0 ]; then exit 1; fi
55+
patch --directory="$AR_COMPS/arduino" -p1 < patches/arduino_typo.diff
5456

5557
#
5658
# CLONE/UPDATE ESP32-CAMERA
@@ -59,45 +61,48 @@ echo "Updating ESP32 Camera..."
5961
if [ ! -d "$AR_COMPS/esp32-camera" ]; then
6062
git clone $CAMERA_REPO_URL "$AR_COMPS/esp32-camera"
6163
else
62-
git -C "$AR_COMPS/esp32-camera" fetch && \
63-
git -C "$AR_COMPS/esp32-camera" pull --ff-only
64+
git -C "$AR_COMPS/esp32-camera" fetch
65+
git -C "$AR_COMPS/esp32-camera" reset --hard
6466
fi
65-
if [ $? -ne 0 ]; then exit 1; fi
67+
git -C "$AR_COMPS/esp32-camera" checkout tags/v2.0.15
6668

6769
#
6870
# CLONE/UPDATE ESP-DL
6971
#
7072
echo "Updating ESP-DL..."
7173
if [ ! -d "$AR_COMPS/esp-dl" ]; then
72-
git clone $DL_REPO_URL "$AR_COMPS/esp-dl" && \
73-
git -C "$AR_COMPS/esp-dl" reset --hard 0632d2447dd49067faabe9761d88fa292589d5d9
74-
if [ $? -ne 0 ]; then exit 1; fi
74+
git clone $DL_REPO_URL "$AR_COMPS/esp-dl"
75+
else
76+
git -C "$AR_COMPS/esp-dl" fetch
77+
git -C "$AR_COMPS/esp-dl" reset --hard
7578
fi
79+
git -C "$AR_COMPS/esp-dl" checkout 0632d2447dd49067faabe9761d88fa292589d5d9
7680

7781
#
7882
# CLONE/UPDATE ESP-LITTLEFS
7983
#
8084
echo "Updating ESP-LITTLEFS..."
8185
if [ ! -d "$AR_COMPS/esp_littlefs" ]; then
82-
git clone $LITTLEFS_REPO_URL "$AR_COMPS/esp_littlefs" && \
83-
git -C "$AR_COMPS/esp_littlefs" submodule update --init --recursive
86+
git clone $LITTLEFS_REPO_URL "$AR_COMPS/esp_littlefs"
8487
else
85-
git -C "$AR_COMPS/esp_littlefs" fetch && \
86-
git -C "$AR_COMPS/esp_littlefs" pull --ff-only && \
87-
git -C "$AR_COMPS/esp_littlefs" submodule update --init --recursive
88+
git -C "$AR_COMPS/esp_littlefs" fetch
89+
git -C "$AR_COMPS/esp_littlefs" reset --hard
8890
fi
89-
if [ $? -ne 0 ]; then exit 1; fi
91+
git -C "$AR_COMPS/esp_littlefs" checkout tags/v1.16.4
92+
git -C "$AR_COMPS/esp_littlefs" submodule update --init --recursive
9093

9194
#
9295
# CLONE/UPDATE ESP-RAINMAKER
9396
#
9497
echo "Updating ESP-RainMaker..."
9598
if [ ! -d "$AR_COMPS/esp-rainmaker" ]; then
96-
git clone $RMAKER_REPO_URL "$AR_COMPS/esp-rainmaker" && \
97-
git -C "$AR_COMPS/esp-rainmaker" reset --hard d8e93454f495bd8a414829ec5e86842b373ff555 && \
98-
git -C "$AR_COMPS/esp-rainmaker" submodule update --init --recursive
99+
git clone $RMAKER_REPO_URL "$AR_COMPS/esp-rainmaker"
100+
else
101+
git -C "$AR_COMPS/esp-rainmaker" fetch
102+
git -C "$AR_COMPS/esp-rainmaker" reset --hard
99103
fi
100-
if [ $? -ne 0 ]; then exit 1; fi
104+
git -C "$AR_COMPS/esp-rainmaker" checkout 0414a8530ec1ac8714269302503c71c238b68836
105+
git -C "$AR_COMPS/esp-rainmaker" submodule update --init --recursive
101106

102107
#
103108
# CLONE/UPDATE ESP-DSP
@@ -106,10 +111,10 @@ echo "Updating ESP-DSP..."
106111
if [ ! -d "$AR_COMPS/espressif__esp-dsp" ]; then
107112
git clone $DSP_REPO_URL "$AR_COMPS/espressif__esp-dsp"
108113
else
109-
git -C "$AR_COMPS/espressif__esp-dsp" fetch && \
110-
git -C "$AR_COMPS/espressif__esp-dsp" pull --ff-only
114+
git -C "$AR_COMPS/espressif__esp-dsp" fetch
115+
git -C "$AR_COMPS/espressif__esp-dsp" reset --hard
111116
fi
112-
if [ $? -ne 0 ]; then exit 1; fi
117+
git -C "$AR_COMPS/espressif__esp-dsp" checkout tags/v1.6.1
113118

114119
#
115120
# CLONE/UPDATE TINYUSB
@@ -118,8 +123,8 @@ echo "Updating TinyUSB..."
118123
if [ ! -d "$AR_COMPS/arduino_tinyusb/tinyusb" ]; then
119124
git clone $TINYUSB_REPO_URL "$AR_COMPS/arduino_tinyusb/tinyusb"
120125
else
121-
git -C "$AR_COMPS/arduino_tinyusb/tinyusb" fetch && \
122-
git -C "$AR_COMPS/arduino_tinyusb/tinyusb" pull --ff-only
126+
git -C "$AR_COMPS/arduino_tinyusb/tinyusb" fetch
127+
git -C "$AR_COMPS/arduino_tinyusb/tinyusb" reset --hard
123128
fi
124-
if [ $? -ne 0 ]; then exit 1; fi
125-
129+
git -C "$AR_COMPS/arduino_tinyusb/tinyusb" checkout 0.15.0
130+
git -C "$AR_COMPS/arduino_tinyusb/tinyusb" submodule update --init --recursive

0 commit comments

Comments
 (0)