#!/bin/sh # create used variables round="" num_rounds="9" #the total number of rounds per match #begin loop while true; do read line echo $line if [ "$line" = "NEW_ROUND" ] then round=$(($round + 1)); if [ $round = $num_rounds ] then round="0"; fi echo "INCLUDE round${round}.cfg"; #outputs rotation line into cfg echo "INCLUDE round${round}.cfg" > /home/admin/soc/etc/games/armagetronad-dedicated/everytime.cfg; fi if [ "$line" = "NEW_MATCH" ] then round="0"; fi if [ "$line" = "GAME_END" ] then round="0"; fi