2021-06-15 00:45:22 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
# set -x
|
|
|
|
|
2024-02-20 22:49:59 +01:00
|
|
|
apt update
|
|
|
|
apt-get install avahi-utils -y
|
|
|
|
|
2021-06-15 00:45:22 +02:00
|
|
|
mkdir -p config
|
2021-06-15 10:19:21 +02:00
|
|
|
script/setup
|
2021-06-15 00:45:22 +02:00
|
|
|
|
|
|
|
cpp_json=.vscode/c_cpp_properties.json
|
|
|
|
if [ ! -f $cpp_json ]; then
|
|
|
|
echo "Initializing PlatformIO..."
|
|
|
|
pio init --ide vscode --silent
|
|
|
|
sed -i "/\\/workspaces\/esphome\/include/d" $cpp_json
|
|
|
|
else
|
2021-09-20 09:07:38 +02:00
|
|
|
echo "Cpp environment already configured. To reconfigure it you can run one the following commands:"
|
|
|
|
echo " pio init --ide vscode"
|
2021-06-15 00:45:22 +02:00
|
|
|
fi
|