Update entrypoint.sh
This commit is contained in:
@@ -213,7 +213,7 @@ if [[ ${UPDATE_SERVER} == 1 ]]; then
|
||||
# Get mod's latest update in epoch time from its Steam Workshop changelog page
|
||||
latestUpdate=$(curl -sL https://steamcommunity.com/sharedfiles/filedetails/changelog/$modID | grep '<p id=' | head -1 | cut -d'"' -f2)
|
||||
# If the update time is valid and newer than the local directory's creation date, or the mod hasn't been downloaded yet, download the mod
|
||||
if [[ ! -d @$modID ]] || [[ ( -n $latestUpdate ) && ( $latestUpdate =~ ^[0-9]+$ ) && ( $latestUpdate > $(find @$modID | head -1 | xargs stat -c%Z) ) ]]; then
|
||||
if [[ ! -d @$modID ]] || [[ ( -n $latestUpdate ) && ( $latestUpdate =~ ^[0-9]+$ ) && ( $latestUpdate > $(find @$modID | head -1 | xargs stat -c%Y) ) ]]; then
|
||||
# Get the mod's name from the Workshop page as well
|
||||
modName=$(curl -sL https://steamcommunity.com/sharedfiles/filedetails/changelog/$modID | grep 'workshopItemTitle' | cut -d'>' -f2 | cut -d'<' -f1)
|
||||
if [[ -z $modName ]]; then # Set default name if unavailable
|
||||
|
Reference in New Issue
Block a user