shell check

This commit is contained in:
godsbane 2022-10-10 03:35:58 -04:00
parent e23aa683c7
commit ed64133aa5

View file

@ -8,19 +8,19 @@ OS_setupPrereqsArch(){
done
#The user must be in the wheel group to install flatpaks successfully.
wheel=$(awk '/'${USER}'/ {if ($1 ~ /wheel/) print}' /etc/group)
wheel=$(awk '/'"${USER}"'/ {if ($1 ~ /wheel/) print}' /etc/group)
if [[ ! "${wheel}" =~ ${USER} ]]; then
text="$(printf "Hey! This is not an SteamDeck. EmuDeck can work just fine, but you need to have a valid user account\n\nThe script will ask for your password to make sure everything works as expected.")"
zenity --info \
--title="EmuDeck" \
--width=450 \
--text="${text}" 2>/dev/null
sudo usermod -a -G wheel ${USER}
sudo usermod -a -G wheel "${USER}"
newgrp wheel
fi
#Ensure the Desktop directory isn't owned by root
if [[ "$(stat -c %U ${HOME}/Desktop)" =~ root ]]; then
sudo chown -R ${USER}:${USER} ~/Desktop
if [[ "$(stat -c %U "${HOME}"/Desktop)" =~ root ]]; then
sudo chown -R "${USER}":"${USER}" ~/Desktop
fi
}