= fix, shellcheck false positive
This commit is contained in:
		@@ -19,13 +19,15 @@ else
 | 
				
			|||||||
	mkdir -p "$LUA_PATH"
 | 
						mkdir -p "$LUA_PATH"
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if [ "$WORKSHOP_COLLECTION_ID" = "0" ] || [ "$WORKSHOP_COLLECTION_ID" = "" ]; then
 | 
					if [ "$WORKSHOP_COLLECTION_ID" = "0" ] || [ "$WORKSHOP_COLLECTION_ID" = "" ] || [ "$WORKSHOP_AUTOLOAD" != "true" ]; then
 | 
				
			||||||
	echo "given ID is default, no workshop download"
 | 
						echo "No auto workshop download"
 | 
				
			||||||
else
 | 
					else
 | 
				
			||||||
	touch "$LUA_FILE"
 | 
						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+' )
 | 
						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=""
 | 
						str=""
 | 
				
			||||||
	for i in "${arr[@]}"
 | 
						# resplitting needed here, otherwise one string with complete ids
 | 
				
			||||||
 | 
						# shellcheck disable=SC2068
 | 
				
			||||||
 | 
						for i in ${arr[@]}
 | 
				
			||||||
	do
 | 
						do
 | 
				
			||||||
		str=${str}"resource.AddWorkshop( \"${i}\" )"$'\n'
 | 
							str=${str}"resource.AddWorkshop( \"${i}\" )"$'\n'
 | 
				
			||||||
	done
 | 
						done
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user