tasmota-pcpower-build/build.sh

27 lines
620 B
Bash
Raw Normal View History

2023-02-13 05:24:56 +00:00
#!/bin/bash
apt-get update
apt-get -y install git
base_dir=$(pwd)
2023-02-13 05:35:31 +00:00
echo "Cloning Tasmota"
2023-02-13 05:24:56 +00:00
git clone https://github.com/arendst/Tasmota.git /tasmota
cd /tasmota
if [ -z "$TASMOTA_VERSION" ]; then
TASMOTA_VERSION=$(wget -qO - https://api.github.com/repos/arendst/Tasmota/releases/latest | grep -oP 'tag_name"\s*:\s*"\K[^"]+')
fi
2023-02-13 05:35:31 +00:00
echo "Checking out version $TASMOTA_VERSION"
2023-02-13 05:24:56 +00:00
git checkout $TASMOTA_VERSION
2023-02-13 05:35:31 +00:00
echo "Setting up config override"
2023-02-13 05:24:56 +00:00
rm -f /tasmota/tasmota/user_config_override.h
cp $base_dir/user_config_override.h /tasmota/tasmota/user_config_override.h
2023-02-13 05:35:31 +00:00
echo "Building using PlatformIO"
2023-02-13 05:24:56 +00:00
pio run -e tasmota