File tree Expand file tree Collapse file tree 2 files changed +43
-0
lines changed Expand file tree Collapse file tree 2 files changed +43
-0
lines changed Original file line number Diff line number Diff line change 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
311ALL_CHIPS=(
412 " esp32"
Original file line number Diff line number Diff line change 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!"
You can’t perform that action at this time.
0 commit comments