mirror of
https://github.com/dragoonDorise/EmuDeck.git
synced 2025-05-05 16:02:48 +00:00
shell check
This commit is contained in:
parent
e23aa683c7
commit
ed64133aa5
@ -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
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user