Last active
June 30, 2026 23:42
-
-
Save T31337/f31438f730509d10186e3ff33d84f4f4 to your computer and use it in GitHub Desktop.
My Script For System+Packages Update/Reinstallation After Updating SteamDeck OS To Restore Desired Package Installations To Updated System
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| function installSoftware() | |
| { | |
| read -p "Continue? (Y/N): " confirm | |
| if [[ "$confirm" == [yY] ]]; then | |
| echo -e "\e[35mInstall Additional Software Now?\e[0m" | |
| echo -e "\e[35mSoftware To Install: git,acpi, bc, ffmpeg, espeak, yt-dlp, android-tools, devede, python-pip\e[0m" | |
| read -p "Continue? (Y/N): " confirm | |
| if [[ "$confirm" == [yY] || "$confirm" == [yY][eE][sS] ]]; then | |
| echo -e "\e[35mInstalling git and acpi\e[0m" | |
| sudo pacman -Sy --needed git acpi | |
| echo -e "\e[35mInstalling bc, ffmpeg, yt-dlp, python-pip and espeak\e[0m" | |
| sudo pacman -Sy --needed bc ffmpeg espeak-ng yt-dlp python-pip | |
| echo -e "\e[35mInstalling android-tools\e[0m" | |
| sudo pacman -Sy --needed android-tools | |
| echo -e "\e[35mInstalling devede\e[0m" | |
| sudo pacman -Sy --needed devede | |
| read -p "install libimobiledevice and usbmuxd? (Y/N):" | |
| if [[ "$confirm" == [yY] || "$confirm" == [yY][eE][sS] ]]; then | |
| echo -e "\e[35mInstalling libimobiledevice and usbmuxd\e[0m" | |
| sudo pacman -Sy --needed libimobiledevice usbmuxd | |
| else | |
| echo -e "\e[35mSkipping libimobiledevice and usbmuxd\e[0m" | |
| fi | |
| read -p "install base-devel? (Y/N): " confirm | |
| if [[ "$confirm" == [yY] ]]; then | |
| sudo pacman -Sy --needed base-devel | |
| else | |
| echo -e "\e[35mskipping base-devel\e[0m" | |
| fi | |
| echo -e "\e[35mDone Installing Software\e[0m" | |
| else | |
| echo -e "\e[35mNo pacman Software Will Be Installed\e[0m" | |
| fi | |
| fi | |
| } | |
| function setupPacman() | |
| { | |
| read -p "Continue? (Y/N): " confirm | |
| if [[ "$confirm" == [yY] ]]; then | |
| echo -e "\e[31mDisabling SteamOS ReadOnly Mode...\e[0m" | |
| sudo steamos-readonly disable | |
| echo -e "\e[35mSetting Up pacman...\e[0m" | |
| sudo pacman-key --init | |
| sudo pacman -S --noconfirm archlinux-keyring | |
| sudo pacman-key --populate archlinux | |
| sudo pacman-key --populate holo | |
| echo -e "\e[35mpacman is now ready for use\e[0m" | |
| installSoftware | |
| else | |
| echo -e "\e[35mAborting Pacman Setup\e[0m" | |
| fi | |
| } | |
| function setupSSHD() | |
| { | |
| read -p "Continue? (Y/N): " confirm | |
| if [[ "$confirm" == [yY] ]]; then | |
| read -p "Start sshd? (Y/N): " confirm | |
| if [[ "$confirm" == [yY] ]]; then | |
| echo -e "\e[35mStarting sshd...\e[0m" | |
| sudo systemctl start sshd | |
| else | |
| echo -e "\e[35msshd was not started per user request\e[0m" | |
| fi | |
| read -p "Enable sshd? (Y/N): " confirm | |
| if [[ "$confirm" == [yY] ]]; then | |
| echo -e "\e[35mEnabling sshd...\e[0m" | |
| sudo systemctl enable sshd | |
| fi | |
| fi | |
| } | |
| function setupJapanese() | |
| { | |
| read -p "Setup Japanese Input? (Y/N): " confirm | |
| if [[ "$confirm" == [yY] ]]; then | |
| echo -e "\e[35mSetting Up Japanese Input...\e[0m" | |
| echo "installing ibus-autostart" | |
| paru -Sy --needed ibus-autostart | |
| echo -e "\e[35mSetting Up ibus environment...\e[0m" | |
| echo "GTK_IM_MODULE=ibus" | sudo tee -a /etc/environment | |
| echo "QT_IM_MODULE=ibus" | sudo tee -a /etc/environment | |
| echo "XMODIFIERS=@im=ibus" | sudo tee -a /etc/environment | |
| echo -e "\e[35mStarting ibus-daemon for Japanese input...\e[0m" | |
| ibus-daemon -rxRd | |
| else | |
| echo -e "\e[35mSkipping Japanese Input Setup...\e[0m" | |
| fi | |
| } | |
| function memorymod() | |
| { | |
| read -p "\e[35mxecute Memory Mod? (Increase To 2GB) (Y/N): \e[0m" confirm | |
| if [[ "$confirm" == [yY] ]]; then | |
| cat << EOF | sudo tee /etc/security/limits.d/memlock.conf | |
| * hard memlock 2147484 | |
| * soft memlock 2147484 | |
| EOF | |
| echo -e "\e[35mMemory Allocation Increased To 2GB\e[0m" | |
| else | |
| echo -e "\e[35mNot Increasing Memory Allocatoin" | |
| fi | |
| } | |
| function noatimemod() | |
| { | |
| read -p "enable noatime?" confirm | |
| if [[ "$confirm" == [yY] ]]; then | |
| sudo sed -i -e '/home/s/\bdefaults\b/&,noatime/' /etc/fstab | |
| else | |
| echo -e "\e[35mkeeping file access time\e[0m" | |
| fi | |
| } | |
| echo -e "\e[35mAfter-Update Helper Script:\e[0m\n" | |
| setupPacman | |
| setupJapanese | |
| setupSSHD | |
| memorymod | |
| noatimemod | |
| #Script Finished Running... | |
| echo -e "\e[35mDone!\e[0m" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment