#!/bin/bash # Get the current user CURRENT_USER=$(whoami) # Update system and install dependencies sudo apt-get update && sudo apt-get upgrade -y 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 # Make all shell scripts executable sudo chmod +x *.sh # Run the installation script 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 \"python /home/$CURRENT_USER/x735-v2.5/pwm_fan_control.py &\" >> /home/$CURRENT_USER/.bashrc" # Notify user echo "Setup complete. Please open a new terminal for changes to take effect."