Update 00-pi_firmware_install.sh

This commit is contained in:
RomanNum3ral 2025-08-03 17:39:49 +00:00
parent 9345caa791
commit 163a3a0fb0
1 changed files with 9 additions and 6 deletions

View File

@ -2,6 +2,7 @@
# Get the current user
CURRENT_USER=$(whoami)
INSTALL_DIR="/home/$CURRENT_USER/jellyfin_raspberry_pi/x735-v2.5"
# Update system and install dependencies
sudo apt-get update && sudo apt-get upgrade -y
@ -9,9 +10,11 @@ sudo apt install -y python3
sudo apt install -y pigpio python3-pigpio git
#sudo apt install -y python-pigpio
# Clone the repository
git clone https://gitea.fortis-scientia.com/RomanNum3ral/x735-v2.5
cd x735-v2.5
# Clone the repository (if it doesn't already exist)
if [ ! -d "$INSTALL_DIR" ]; then
git clone https://gitea.fortis-scientia.com/RomanNum3ral/x735-v2.5 "$INSTALL_DIR"
fi
cd "$INSTALL_DIR" || exit 1
# Make all shell scripts executable
sudo chmod +x *.sh
@ -20,8 +23,8 @@ sudo chmod +x *.sh
sudo bash install.sh
# Add alias and Python script to .bashrc for the current user
sudo -u $CURRENT_USER bash -c "echo \"alias off='sudo /home/$CURRENT_USER/x735-v2.5/x735softsd.sh'\" >> /home/$CURRENT_USER/.bashrc"
sudo -u $CURRENT_USER bash -c "echo \"python3 /home/$CURRENT_USER/x735-v2.5/pwm_fan_control.py &\" >> /home/$CURRENT_USER/.bashrc"
sudo -u "$CURRENT_USER" bash -c "echo \"alias off='sudo $INSTALL_DIR/x735softsd.sh'\" >> /home/$CURRENT_USER/.bashrc"
sudo -u "$CURRENT_USER" bash -c "echo \"python3 $INSTALL_DIR/pwm_fan_control.py &\" >> /home/$CURRENT_USER/.bashrc"
# Notify user
echo "Setup complete. Please open a new terminal for changes to take effect."
echo "Setup complete. Please open a new terminal for changes to take effect."