Skip to content

Instantly share code, notes, and snippets.

@twskipper
Last active January 1, 2021 16:59
Show Gist options
  • Save twskipper/a53314201fb5c4ce37041785750dd9fc to your computer and use it in GitHub Desktop.
Save twskipper/a53314201fb5c4ce37041785750dd9fc to your computer and use it in GitHub Desktop.
shell convert modoverrides to ServerModsetup for Don't Stave Together Dedicated Server
#!/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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment