= fix, shellcheck false positive
This commit is contained in:
parent
6c65b855a5
commit
45b4d0235b
@ -19,13 +19,15 @@ else
|
||||
mkdir -p "$LUA_PATH"
|
||||
fi
|
||||
|
||||
if [ "$WORKSHOP_COLLECTION_ID" = "0" ] || [ "$WORKSHOP_COLLECTION_ID" = "" ]; then
|
||||
echo "given ID is default, no workshop download"
|
||||
if [ "$WORKSHOP_COLLECTION_ID" = "0" ] || [ "$WORKSHOP_COLLECTION_ID" = "" ] || [ "$WORKSHOP_AUTOLOAD" != "true" ]; then
|
||||
echo "No auto workshop download"
|
||||
else
|
||||
touch "$LUA_FILE"
|
||||
arr=$(wget -q -O - https://steamcommunity.com/sharedfiles/filedetails/?id="${WORKSHOP_COLLECTION_ID}" | tr '\n' ' ' | grep -Po '"workshopItem"[^"]+"https://steamcommunity.com/sharedfiles/filedetails/\?id=(\d+)' | grep -Po '\d\d\d+' )
|
||||
str=""
|
||||
for i in "${arr[@]}"
|
||||
# resplitting needed here, otherwise one string with complete ids
|
||||
# shellcheck disable=SC2068
|
||||
for i in ${arr[@]}
|
||||
do
|
||||
str=${str}"resource.AddWorkshop( \"${i}\" )"$'\n'
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user