Skip to content

Commit 62d4311

Browse files
authored
Merge pull request #26 from espressif/feat/update_scripts
Feat/update scripts
2 parents 5eccac3 + 7674d6b commit 62d4311

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed

tools/build_all_chips.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
#!/usr/bin/env bash
2+
set -e
3+
4+
# Get the script's directory and project root
5+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
6+
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
7+
8+
# Change to project root
9+
cd "$PROJECT_ROOT"
210

311
ALL_CHIPS=(
412
"esp32"

tools/install_all_chips.sh

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/usr/bin/env bash
2+
set -e
3+
4+
# Get the script's directory and project root
5+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
6+
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
7+
8+
# ESPTOOL_STUBS_DIR must be specified
9+
if [[ -z "$ESPTOOL_STUBS_DIR" ]]; then
10+
echo "Error: ESPTOOL_STUBS_DIR environment variable must be set" >&2
11+
echo "Example: export ESPTOOL_STUBS_DIR=/path/to/esptool/esptool/targets/stub_flasher/2" >&2
12+
exit 1
13+
fi
14+
15+
# Change to project root
16+
cd "$PROJECT_ROOT"
17+
18+
echo "Installing JSON stub files to: $ESPTOOL_STUBS_DIR"
19+
20+
# Find all JSON files in build-* directories
21+
FOUND=0
22+
for json_file in build-*/*.json; do
23+
if [[ -f "$json_file" ]]; then
24+
echo "Installing $json_file"
25+
cp "$json_file" "$ESPTOOL_STUBS_DIR/"
26+
FOUND=1
27+
fi
28+
done
29+
30+
if [[ $FOUND -eq 0 ]]; then
31+
echo "Warning: No JSON files found in build-* directories" >&2
32+
exit 1
33+
fi
34+
35+
echo "Installation complete!"

0 commit comments

Comments
 (0)