Skip to content

Commit

Permalink
Update install-GUI.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
jlobue10 committed Nov 19, 2023
1 parent 3968ff3 commit 07fd600
Showing 1 changed file with 24 additions and 27 deletions.
51 changes: 24 additions & 27 deletions install-GUI.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,35 @@

# A simple script to install the rEFInd customization GUI
sudo steamos-readonly disable
sudo pacman-key --init
sudo pacman-key --populate archlinux
# sudo pacman -Sy base-devel
# Install base-devel member packages
sudo pacman -Sy --noconfirm archlinux-keyring autoconf automake binutils bison debugedit fakeroot file findutils flex gawk gcc gettext\
grep groff gzip libtool m4 make pacman patch pkgconf sed sudo texinfo which
sudo pacman -Sy --noconfirm lib32-glibc glibc hwinfo linux-api-headers qt5-base
echo -e "Installing SteamDeck rEFInd...\n"
cd $HOME
sudo rm -rf ./SteamDeck_rEFInd/
git clone https://github.com/jlobue10/SteamDeck_rEFind
cd SteamDeck_rEFind
CURRENT_WD=$(pwd)
mkdir -p $HOME/.SteamDeck_rEFInd/backgrounds
cp -rf $CURRENT_WD/GUI/ $HOME/.SteamDeck_rEFInd
cp -rf $CURRENT_WD/icons/ $HOME/.SteamDeck_rEFInd
cp -f $CURRENT_WD/themes/background.png $HOME/.SteamDeck_rEFInd/backgrounds/
cp -f $CURRENT_WD/{restore_EFI_entries.sh,bootnext-refind.service} $HOME/.SteamDeck_rEFInd/
cp -f $CURRENT_WD/{install_config_from_GUI.sh,refind_install_pacman_GUI.sh,refind_install_no_pacman_GUI.sh} $HOME/.SteamDeck_rEFInd/
cp -f $CURRENT_WD/refind-GUI.conf $HOME/.SteamDeck_rEFInd/GUI/refind.conf
chmod 755 $HOME/.SteamDeck_rEFInd/*.sh
chmod +x $HOME/.SteamDeck_rEFInd/GUI/refind_GUI.desktop
cd $HOME/.SteamDeck_rEFInd/GUI/src
qmake
make

if [ ! -f $HOME/.SteamDeck_rEFInd/GUI/src/rEFInd_GUI ]; then
echo -e "\nGUI compile failed. Please try again after ensuring that your cloned repo is up to date and your pacman config is normal.\n"
sudo steamos-readonly enable
exit 1
mkdir -p $HOME/.local/SteamDeck_rEFInd
cp -rf $CURRENT_WD/GUI/ $HOME/.local/SteamDeck_rEFInd
cp -rf $CURRENT_WD/icons/ $HOME/.local/SteamDeck_rEFInd
cp -rf $CURRENT_WD/backgrounds/ $HOME/.local/SteamDeck_rEFInd
cp -f $CURRENT_WD/refind-GUI.conf $HOME/.local/SteamDeck_rEFInd/GUI/refind.conf

# Thanks to Maclay74 steaam-patch for the following syntax
RELEASE=$(curl -s 'https://api.github.com/repos/jlobue10/SteamDeck_rEFInd/releases' | jq -r "first(.[] | select(.prerelease == "false"))")
VERSION=$(jq -r '.tag_name' <<< ${RELEASE} )
DOWNLOAD_URL=$(jq -r '.assets[].browser_download_url | select(endswith("x86_64.pkg.tar.zst"))' <<< ${RELEASE})

printf "Installing version %s...\n" "${VERSION}"
wget $DOWNLOAD_URL

sudo pacman -Qs SteamDeck_rEFInd
STEAMDECK_REFIND_STATUS=$?
if [ $STEAMDECK_REFIND_STATUS == 0 ]; then
sudo pacman -R SteamDeck-rEFInd
fi

sudo pacman -U SteamDeck_rEFInd-*.x86_64.pkg.tar.zst

# Leaving passwordless sudo stuff to try to fix another day...
#Create file for passwordless sudo for config file, background and icon installation
#cat > $HOME/.SteamDeck_rEFInd/install_config_from_GUI <<EOF
#$USER ALL = NOPASSWD: $HOME/.SteamDeck_rEFInd/install_config_from_GUI.sh
Expand All @@ -43,8 +40,8 @@ fi

#sudo cp $HOME/.SteamDeck_rEFInd/install_config_from_GUI /etc/sudoers.d 2>/dev/null

cp -f rEFInd_GUI ../
sudo steamos-readonly enable

cp -f $HOME/.SteamDeck_rEFInd/GUI/refind_GUI.desktop $HOME/Desktop/refind_GUI.desktop
chmod +x $HOME/Desktop/refind_GUI.desktop
cp -f /usr/share/applications/SteamDeck_rEFInd.desktop $HOME/Desktop/SteamDeck_rEFInd.desktop
chmod +x $HOME/Desktop/SteamDeck_rEFInd.desktop
echo -e "Installation complete...\n"

0 comments on commit 07fd600

Please sign in to comment.