Skip to content

Commit

Permalink
fix grep
Browse files Browse the repository at this point in the history
  • Loading branch information
arfrie22 committed Aug 5, 2024
1 parent b5a83a5 commit b71e76a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function enable_i2c {
echo "Enabling i2c"
sudo modprobe i2c-dev
sudo raspi-config nonint do_i2c 0
if ! grep -q 'dtparam=i2c_arm=on$ /boot/config.txt'; then
if ! grep -q 'dtparam=i2c_arm=on$' /boot/config.txt; then
echo "Setting the i2c clock speed to 400 kHz, you will have to reboot for this to take effect."
sudo sed -i -e 's/dtparam=i2c_arm=on$/dtparam=i2c_arm=on,i2c_arm_baudrate=400000/g' /boot/config.txt
fi
Expand Down

0 comments on commit b71e76a

Please sign in to comment.