added small check for now to test plugin

This commit is contained in:
Roy 2024-02-15 00:00:20 -08:00 committed by GitHub
parent a714084255
commit 1063ec5946
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2720,18 +2720,24 @@ fi
# Detach script from Steam process
nohup sh -c 'sleep 10; /usr/bin/steam' &
# Close all instances of Steam
steam_pid() { pgrep -x steam ; }
steam_running=$(steam_pid)
[[ -n "$steam_running" ]] && killall steam
# Define the directory
dir="${logged_in_home}/homebrew/NonSteamLaunchersDecky/"
# Wait for the steam process to exit
while steam_pid > /dev/null; do sleep 5; done
# Check if the directory does not exist
if [ ! -d "$dir" ]; then
# Close all instances of Steam
steam_pid() { pgrep -x steam ; }
steam_running=$(steam_pid)
[[ -n "$steam_running" ]] && killall steam
# Wait for the steam process to exit
while steam_pid > /dev/null; do sleep 5; done
else
echo "Directory $dir exists. Not restarting Steam."
fi