Skip to content

Commit

Permalink
v1.6.6 - small fix to make the transition of the recent git reset easier
Browse files Browse the repository at this point in the history
  • Loading branch information
frostworx committed Sep 11, 2020
1 parent 9be463f commit 8edcf79
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions stl
Expand Up @@ -5,7 +5,7 @@
### project ###

PROGNAME="SteamTinkerLaunch"
PROGVERS="v1.6.5"
PROGVERS="v1.6.6"
PROGCMD="$(basename "$0")"
PROJECTPAGE="https://github.com/frostworx/steamtinkerlaunch"

Expand Down Expand Up @@ -135,7 +135,7 @@ SBSTWEAKCFG="$SBSTWEAKDIR/$AID.conf" # the game specific shareable
ATDLDIR="$STLDLDIR/autotweak" # main autotweak download dir

# optional global config replacement dirs, which can be pulled using DLGLOBAL:
GLDLSTLDIR="$STLDLDIR/$PROGCMD"
GLDLSTLDIR="$STLDLDIR/$PROGNAME"
GLDLSTLTXT="${GLDLSTLDIR}.txt"
GLDLTWEAKDIR="$GLDLSTLDIR/tweaks"
GLDLUSERTWEAKDIR="$GLDLTWEAKDIR/user"
Expand Down Expand Up @@ -1613,13 +1613,23 @@ function createDefaultCfgs {
# DLGLOBAL will be set to 0 if global SYSTEMSTLCFGDIR can be found!
# The update will only run once a day

function reinitSTLdl {
# changed the download path - at least a warning that the old checkout is no longer used
OLDGLDLSTLDIR="$STLDLDIR/$PROGCMD"
if [ -d "$OLDGLDLSTLDIR" ]; then
writelog "INFO" "${FUNCNAME[0]} - reinitialized the git download to '$GLDLSTLDIR' - the old directory '$OLDGLDLSTLDIR is no longer used"
fi
}

function checkSTLDLGlobal {
if [ "$(USEDLGLOBAL)" -ge 1 ]; then
MAXAGE=1440
if [ ! -f "$GLDLSTLTXT" ] || [ ! -d "$SYSTEMSTLCFGDIR" ] || test "$(find "$GLDLSTLTXT" -mmin +"$MAXAGE")"; then
gitUpdate "$GLDLSTLDIR" "$PROJECTPAGE"
date > "$GLDLSTLTXT"
fi

reinitSTLdl
fi
}

Expand Down Expand Up @@ -4249,6 +4259,7 @@ function commandline {
if [ "$2" == "$GIT" ]; then
gitUpdate "$GLDLSTLDIR" "$PROJECTPAGE"
date > "$GLDLSTLTXT"
reinitSTLdl
else
howto
fi
Expand Down

0 comments on commit 8edcf79

Please sign in to comment.