Skip to content

Commit

Permalink
shellcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
sonic2kk committed Jul 17, 2024
1 parent a957216 commit 57f9410
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions steamtinkerlaunch
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
PREFIX="/usr"
PROGNAME="SteamTinkerLaunch"
NICEPROGNAME="Steam Tinker Launch"
PROGVERS="v14.0.20240712-1"
PROGVERS="v14.0.20240718-1 (use-mostrecent-loginuser-userdatadir)"
PROGCMD="${0##*/}"
PROGINTERNALPROTNAME="Proton-stl"
SHOSTL="stl"
Expand Down Expand Up @@ -24344,7 +24344,7 @@ function generateSteamShortID {
function fillLoginUsersCSV {
# Don't overwrite LoginUsersCSV file if it exists and is not blank, only re-create it if SHM dir is cleared
# The loginusers are not likely to change after the SHM dir is created so this is a bit more efficient
if [ -f "$LOGINUSERSCSV" ] && [ -s "$LOGINUSERCSV" ]; then
if [ -f "$LOGINUSERSCSV" ] && [ -s "$LOGINUSERSCSV" ]; then
writelog "INFO" "${FUNCNAME[0]} - '${LOGINUSERSCSV}' already exists -- Not re-creating"
return
fi
Expand All @@ -24354,10 +24354,9 @@ function fillLoginUsersCSV {

# Toplevel block in loginusers.vdf is "users", get all block names ("[0-9]+" with one hardcoded indent, because we know we only have 1 indent)
#
# TODO it would be nice to have a generic function to get all toplevel VDF block names like this, but =
# TODO it would be nice to have a generic function to get all toplevel VDF block names like this, but
# We can't know the pattern and would need to know how to differentiate between a blockname and a property name
# It just si happens for loginusers that it only contains blocks
LOGINUSERIDS=()
# It just so happens for loginusers that it only contains blocks
if [ -f "${LOGUVDF}" ]; then
writelog "INFO" "${FUNCNAME[0]} - Found loginusers file at '${LOGUVDF}' -- Will attempt to parse this file"
mapfile -t LOGINUSERLONGIDS < <(getVdfSection '"users"' "" "" "${LOGUVDF}" | grep -oP '^\t"[0-9]+"' | tr -d '\t"\ ')
Expand Down

0 comments on commit 57f9410

Please sign in to comment.