Skip to content

Commit

Permalink
minor for #486
Browse files Browse the repository at this point in the history
  • Loading branch information
frostworx committed Aug 4, 2022
1 parent fa82187 commit 9258d92
Showing 1 changed file with 23 additions and 9 deletions.
32 changes: 23 additions & 9 deletions steamtinkerlaunch
Original file line number Diff line number Diff line change
Expand Up @@ -181,25 +181,25 @@ fi
LOGDIRID="$LOGDIR/id"

LOGDIRTI="$LOGDIR/title"
STLPROTONLOGDIR="$BASELOGDIR/proton" # proton logfile dir
STLPROTONIDLOGDIR="$STLPROTONLOGDIR/id" # proton id logfile dir
STLPROTONTILOGDIR="$STLPROTONLOGDIR/title" # proton title logfile dir
STLPROTONLOGDIR="$BASELOGDIR/proton"
STLPROTONIDLOGDIR="$STLPROTONLOGDIR/id"
STLPROTONTILOGDIR="$STLPROTONLOGDIR/title"
STLDXVKLOGDIR="$BASELOGDIR/dxvk"
STLWINELOGDIR="$BASELOGDIR/wine" # wine logfile dir
STLWINELOGDIR="$BASELOGDIR/wine"
STLVKD3DLOGDIR="$BASELOGDIR/vkd3d"
STLGLLOGDIR="$BASELOGDIR/gamelaunch" # gamerlaunch logfile dir
STLGLLOGDIR="$BASELOGDIR/gamelaunch"
STLGLLOGDIRID="$STLGLLOGDIR/id"
STLGLLOGDIRTI="$STLGLLOGDIR/title"
PLAYTIMELOGDIR="$BASELOGDIR/playtime"
STLGAMEDIR="$STLCFGDIR/gamecfgs" # default basedir for game the gamespecific configs
STLGAMEDIR="$STLCFGDIR/gamecfgs"
STLGUIDIR="$STLCFGDIR/guicfgs"
STLGAMEDIRID="$STLGAMEDIR/id"
STLCUSTVARSDIR="$STLGAMEDIR/customvars"
GLOBCUSTVARS="$STLCUSTVARSDIR/global-custom-vars.conf"
STLGAMEDIRTI="$STLGAMEDIR/title"
STLCOLLECTIONDIR="$STLCFGDIR/collections" # the directory holding config files with preconfigured settings for games in specific steamcollections
STLREGDIR="$STLCFGDIR/regs" # the directory holding registry files
STLDLDIR="$STLCFGDIR/downloads" # the directory holding optional downloads
STLCOLLECTIONDIR="$STLCFGDIR/collections"
STLREGDIR="$STLCFGDIR/regs"
STLDLDIR="$STLCFGDIR/downloads"
STLBACKDIR="$STLCFGDIR/backup"
BACKEX="$STLBACKDIR/exclude"
HIDEDIR="$STLCFGDIR/hide"
Expand Down Expand Up @@ -5979,7 +5979,21 @@ function migrateCfgOption {
updateConfigEntry "CHECKCOLLECTIONS" "$CHECKCOLLECTIONS" "$STLGAMECFG"
fi

#XXXXXXXXX
writelog "INFO" "${FUNCNAME[0]} - Upcoming file migration. Some files in '$STLCFGDIR' will soon be migrated to '$STLDATADIR' or '$STLCACHEDIR' - see #486"

function wip {
if [ "$(df -P "$STLCFGDIR" | awk 'END{print $NF}')" == "$(df -P "$STLCACHEDIR" | awk 'END{print $NF}')" ];then
writelog "INFO" "${FUNCNAME[0]} - '$STLCACHEDIR' is on the same partition like '$STLCFGDIR'"
else
writelog "INFO" "${FUNCNAME[0]} - '$STLCACHEDIR' is on a different partition like '$STLCFGDIR' - need to check if there's enough space for migrating"
OLDSTLDLDIR="$STLCFGDIR/downloads"
NEWSTLDLDIR="$STLCACHEDIR/downloads"
OLDDLDIRSIZE="$(du -sb "$OLDSTLDLDIR" | awk 'END{print $1}')"
DLDIRSIZE="$(df -k --output=avail "$NEWSTLDLDIR" | tail -n1)"
writelog "INFO" "${FUNCNAME[0]} - OLDDLDIRSIZE is '$OLDDLDIRSIZE'; DLDIRSIZE is '$DLDIRSIZE'"
fi
}
fi
}

Expand Down

0 comments on commit 9258d92

Please sign in to comment.