use apt-get and resolve sonic-pi deps

This commit is contained in:
deflax 2025-08-25 00:26:04 +00:00
parent 576ba2168c
commit 89f8a74f34

View file

@ -1,27 +1,29 @@
#!/bin/bash
# upgrade system
apt update
apt dist-upgrade -y --autoremove
apt-get update
apt-get upgrade -y --autoremove
# setup apps
apt install htop wget -y
apt-get install htop wget -y
# setup sonic-pi
wget https://sonic-pi.net/files/releases/v4.6.0/sonic-pi_4.6.0_1_bookworm.arm64.deb -o sonicpi.deb
dpkg -i sonicpi.deb
wget https://sonic-pi.net/files/releases/v4.6.0/sonic-pi_4.6.0_1_bookworm.arm64.deb
dpkg -i sonic-pi_4.6.0_1_bookworm.arm64.deb
apt-get --fix-broken install -y
# setup udev
echo "SUBSYSTEM==\"usb\", ENV{DEVTYPE}==\"usb_device\", MODE=\"0666\"" > /etc/udev/rules.d/50-udev-default.rules
# setup firewall
apt install ufw -y
apt-get install ufw -y
ufw allow ssh
ufw enable
# deploy patch
mkdir -vp /home/pi/.sonic-pi/config/
mv -v /root/init.rb /home/pi/.sonic-pi/config/init.rb
chown -R pi:pi /home/pi/.sonic-pi
chown -R pi:pi /home/pi/.sonic-pi/config
# cleanup