Changeset 479


Ignore:
Timestamp:
Nov 13, 2023, 4:38:42 PM (13 months ago)
Author:
alloc
Message:

Scripts

Location:
scripts/usr/local/lib/7dtd
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • scripts/usr/local/lib/7dtd/commands/updateengine.sh

    r478 r479  
    9898               
    9999                echo
     100               
     101                if [ "$REMOTE" = "?" ]; then
     102                        echo "Could not fetch remote build information"
     103                        return
     104                fi
    100105               
    101106                if [ $REMOTE -gt $LOCAL ]; then
     
    135140        local LOCAL=$(getLocalEngineVersion)
    136141        local REMOTE=$(getRemoteBuildId $BRANCHNAME)
     142       
     143        if [ "$REMOTE" = "?" ]; then
     144                echo "Could not fetch remote build information, assuming update to be available"
     145                REMOTE=30123456
     146        fi
    137147
    138148        if [ "$FORCED" = "yes" -o $REMOTE -gt $LOCAL ]; then
  • scripts/usr/local/lib/7dtd/common.sh

    r478 r479  
    185185        if [ "$DOCHECK" = "yes" ]; then
    186186                echo "Updating version information..."
    187                 rm /root/Steam/appcache/appinfo.vdf
     187                rm -f /root/Steam/appcache/appinfo.vdf
    188188                cd $SDTD_BASE/steamcmd
    189189               
    190190                expect /usr/local/lib/7dtd/steamcmd.exp $SDTD_BASE/steamcmd/steamcmd.sh 294420 2>/dev/null > /tmp/7dtd-appinfo
    191191
    192                 local BUILDID=$(getBuildId public)
     192                local BUILDID=$(getRemoteBuildId public)
    193193
    194194                if [ $(isANumber "$BUILDID") -eq 0 ]; then
     
    205205#   BuildId otherwise
    206206getRemoteBuildId() {
     207        if [ ! -f "/tmp/7dtd-appinfo" ]; then
     208                echo "?"
     209                return
     210        fi
     211       
    207212        local BUILDID=$(grep -A 1000 \"branches\" /tmp/7dtd-appinfo | grep -A 1000 \"$1\" | grep -B 10 \} --max-count=1 | grep \"buildid\" | cut -d\" -f4)
    208213
     
    221226#   Update timestamp otherwise
    222227getRemoteBuildUpdateTime() {
     228        if [ ! -f "/tmp/7dtd-appinfo" ]; then
     229                echo "?"
     230                return
     231        fi
     232       
    223233        local TIMESTAMP=$(grep -A 1000 \"branches\" /tmp/7dtd-appinfo | grep -A 1000 \"$1\" | grep -B 10 \} --max-count=1 | grep \"timeupdated\" | cut -d\" -f4)
    224234       
     
    234244#   Blank separated list of branch names (can be empty if an error occured)
    235245getBranchNames() {
     246        if [ ! -f "/tmp/7dtd-appinfo" ]; then
     247                return
     248        fi
     249       
    236250        grep -A 1000 \"branches\" /tmp/7dtd-appinfo | grep -E '^[[:space:]]*"[^"]+"[[:space:]]*$' | tail --lines=+2 | cut -d\" -f2
    237251}
  • scripts/usr/local/lib/7dtd/steamcmd.exp

    r478 r479  
    44}
    55
    6 set timeout 5
     6set timeout 30
    77
    88set STEAMCMD [lindex $argv 0]
Note: See TracChangeset for help on using the changeset viewer.