Created
June 20, 2022 20:31
-
-
Save muzzol/9f559c92a7f1132fcd65b211a86759b2 to your computer and use it in GitHub Desktop.
script for installing packages on Steam Deck using pacman
This file contains 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 | |
# script for installing packages on Steam Deck using | |
# pacman repositories (not flatpack, snap or appimage) | |
# | |
# ATENTION: USE IT AT YOUR OWN RISK!!!! | |
# | |
# this will modify root filesystem so it will probably get | |
# overwrite on system updates but is totally ok executing | |
# it several times, so if something stops working just | |
# launch it again | |
# | |
# àngel "mussol" bosch - muzzol@gmail.com | |
# list of packages separated by spaces | |
PACKAGES="vlc minitube" | |
echo -n "Checking permissions: " | |
if [ "$(id -ru)" == "0" ]; then | |
echo "OK" | |
else | |
echo "ERROR!" | |
echo "this script must be executed by root" | |
echo "Ex: sudo $0" | |
exit 1 | |
fi | |
## system related comands | |
echo "Disabling readonly filesystem" | |
steamos-readonly disable | |
if [ ! -e "/etc/pacman.d/gnupg/trustdb.gpg" ]; then | |
echo "Initalizing pacman keys" | |
pacman-key --init | |
pacman-key --populate archlinux | |
fi | |
echo "Installing package" | |
pacman -Sy --noconfirm $PACKAGES | |
echo "Re-enabling readonly filesystem" | |
steamos-readonly enable | |
echo "Done" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment