1
0
mirror of https://github.com/home-assistant/operating-system.git synced 2025-12-20 02:18:37 +00:00
Files
operating-system/scripts/update-buildroot.sh
Pascal Vizeli aa3fc4766d Fix linter
2020-08-03 14:40:32 +00:00

27 lines
567 B
Bash
Executable File

#!/bin/bash
set -e
if [ -z "$1" ]; then
echo "Need a buildroot version!"
exit 1
fi
rm -rf /tmp/buildroot-new
mkdir -p /tmp/buildroot-new
echo "Download new buildroot"
curl -L "https://buildroot.org/downloads/buildroot-${1}.tar.bz2" \
| tar xvpjf - --strip 1 -C /tmp/buildroot-new
echo "Install patches"
for patch_file in buildroot-patches/*; do
echo "Patch: ${patch_file}"
patch -d /tmp/buildroot-new -p 1 < "${patch_file}";
done
rm -rf buildroot
mv /tmp/buildroot-new buildroot
git add buildroot
git commit -sam "Update buildroot to ${1}"