#!/bin/bash
modoverridesfile=$1
dedicated_server_mods_setupfile=$2
res=$(cat $1|grep -E 'workshop-[0-9]{7,12}' -o|grep -E '[0-9]{7,12}' -o)
for i in ${res[@]};do
echo "ServerModSetup($i)" >> $2
done
useage:
bash gen-mods.sh modoverrides.lua mods/dedicated_server_mods_setup.lua