Changeset 479 for scripts/usr/local/lib/7dtd/common.sh
- Timestamp:
- Nov 13, 2023, 4:38:42 PM (12 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
scripts/usr/local/lib/7dtd/common.sh
r478 r479 185 185 if [ "$DOCHECK" = "yes" ]; then 186 186 echo "Updating version information..." 187 rm /root/Steam/appcache/appinfo.vdf187 rm -f /root/Steam/appcache/appinfo.vdf 188 188 cd $SDTD_BASE/steamcmd 189 189 190 190 expect /usr/local/lib/7dtd/steamcmd.exp $SDTD_BASE/steamcmd/steamcmd.sh 294420 2>/dev/null > /tmp/7dtd-appinfo 191 191 192 local BUILDID=$(get BuildId public)192 local BUILDID=$(getRemoteBuildId public) 193 193 194 194 if [ $(isANumber "$BUILDID") -eq 0 ]; then … … 205 205 # BuildId otherwise 206 206 getRemoteBuildId() { 207 if [ ! -f "/tmp/7dtd-appinfo" ]; then 208 echo "?" 209 return 210 fi 211 207 212 local BUILDID=$(grep -A 1000 \"branches\" /tmp/7dtd-appinfo | grep -A 1000 \"$1\" | grep -B 10 \} --max-count=1 | grep \"buildid\" | cut -d\" -f4) 208 213 … … 221 226 # Update timestamp otherwise 222 227 getRemoteBuildUpdateTime() { 228 if [ ! -f "/tmp/7dtd-appinfo" ]; then 229 echo "?" 230 return 231 fi 232 223 233 local TIMESTAMP=$(grep -A 1000 \"branches\" /tmp/7dtd-appinfo | grep -A 1000 \"$1\" | grep -B 10 \} --max-count=1 | grep \"timeupdated\" | cut -d\" -f4) 224 234 … … 234 244 # Blank separated list of branch names (can be empty if an error occured) 235 245 getBranchNames() { 246 if [ ! -f "/tmp/7dtd-appinfo" ]; then 247 return 248 fi 249 236 250 grep -A 1000 \"branches\" /tmp/7dtd-appinfo | grep -E '^[[:space:]]*"[^"]+"[[:space:]]*$' | tail --lines=+2 | cut -d\" -f2 237 251 }
Note:
See TracChangeset
for help on using the changeset viewer.