Update NonSteamLaunchers.sh

~reverted back
This commit is contained in:
Roy 2024-01-17 16:24:37 -08:00 committed by GitHub
parent faf6ed65e3
commit d80661d3d1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2559,27 +2559,24 @@ if [[ -f "${logged_in_home}/.steam/root/config/loginusers.vdf" ]]; then
# Extract the block of text for the most recent user # Extract the block of text for the most recent user
most_recent_user=$(sed -n '/"users"/,/"MostRecent" "1"/p' "${logged_in_home}/.steam/root/config/loginusers.vdf") most_recent_user=$(sed -n '/"users"/,/"MostRecent" "1"/p' "${logged_in_home}/.steam/root/config/loginusers.vdf")
# Extract the SteamIDs from the block of text for the most recent user # Extract the SteamID from the block of text for the most recent user
steamids=$(echo "$most_recent_user" | grep -o '[0-9]\{17\}') steamid=$(echo "$most_recent_user" | grep -o '[0-9]\{17\}')
# Loop over each SteamID # Convert steamid to steamid3
for steamid in $steamids; do steamid3=$((steamid - 76561197960265728))
# Convert steamid to steamid3
steamid3=$((steamid - 76561197960265728))
# Initialize the userdata_folder variable # Initialize the userdata_folder variable
userdata_folder="" userdata_folder=""
# Directly map steamid3 to userdata folder # Directly map steamid3 to userdata folder
userdata_folder="/home/deck/.steam/root/userdata/${steamid3}" userdata_folder="/home/deck/.steam/root/userdata/${steamid3}"
# Check if userdata_folder exists # Check if userdata_folder exists
if [[ -d "$userdata_folder" ]]; then if [[ -d "$userdata_folder" ]]; then
echo "Found userdata folder for user with SteamID $steamid: $userdata_folder" echo "Found userdata folder for current user: $userdata_folder"
else else
echo "Could not find userdata folder for user with SteamID $steamid" echo "Could not find userdata folder for current user"
fi fi
done
else else
echo "Could not find loginusers.vdf file" echo "Could not find loginusers.vdf file"
fi fi