21 lines
558 B
Text
21 lines
558 B
Text
if [ -z "$SUDO_USER" ]; then
|
|
echo "This script must be run within sudo."
|
|
exit 1
|
|
fi
|
|
|
|
# from says ~/esp
|
|
ESP=/pkg/esp
|
|
|
|
apt-get install git wget flex bison gperf python3 python3-pip python3-venv cmake ninja-build ccache libffi-dev libssl-dev dfu-util libusb-1.0-0
|
|
|
|
sudo -u "$SUDO_USER" bash <<EOF
|
|
mkdir -p $ESP
|
|
cd $ESP
|
|
git clone -b v5.4.1 --recursive https://github.com/espressif/esp-idf.git
|
|
|
|
cd "$ESP/esp-idf"
|
|
export IDF_TOOLS_PATH="$ESP/esp-idf/.espressif"
|
|
./install.sh esp32,esp32c2,esp32c3,esp32c5,esp32c6,esp32c61,esp32h2,esp32p4,esp32s2,esp32s3
|
|
|
|
EOF
|
|
|