Minor improvements

Replaced which with command -v since which is already deprecated
Replaced lsb_release -d with cat /etc/os-release since this method is more universal
Fixed a couple of typos in the PortProton installation script
This commit is contained in:
Boria138
2023-07-21 09:39:19 +06:00
parent 55dedfe548
commit bb97c240eb
4 changed files with 19 additions and 19 deletions

View File

@ -19,7 +19,7 @@ if [[ $(id -u) = 0 ]] ; then
zenity --error --text "Do not run this script as root!"
exit 1
fi
if [[ "${s_install}" != "1" && ! -x "`which "zenity" 2>/dev/null`" ]] ; then
if [[ "${s_install}" != "1" && ! -x "`command -v "zenity" 2>/dev/null`" ]] ; then
echo "You will need to install: zenity, and restart the port."
xdg-open "https://linux-gaming.ru/portproton/" > /dev/null 2>&1 & exit 0
fi
@ -227,7 +227,7 @@ start_portwine () {
setxkbmap us,ru
fi
fi
if [[ -x "`which "gamemoderun" 2>/dev/null`" ]] && [[ "$PW_USE_GAMEMODE" = "1" ]] ; then
if [[ -x "`command -v "gamemoderun" 2>/dev/null`" ]] && [[ "$PW_USE_GAMEMODE" = "1" ]] ; then
export GAMEMODERUN=1
PW_GAMEMODERUN_SLR="gamemoderun"
# if [[ ! -z "${PW_LD_PRELOAD}" ]]