Guest User

Untitled

a guest
Jan 19th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. #!/bin/bash
  2. # qworld map_rotation.sh
  3.  
  4. QUERY=`mysql -ss -umysql -pmysql quakeworld -e "SELECT map_name FROM map_rotation ORDER BY RAND() LIMIT 5;"`
  5. COUNTER=0
  6.  
  7. f1()
  8. {
  9.  
  10. f2(){
  11. for a in $QUERY ; do
  12. echo -e "set k_ml_$COUNTER $a"
  13. let COUNTER=COUNTER+1
  14. done
  15. }
  16. }
  17.  
  18. f1
  19. f2 > /home/quakeworld/qwserver/ktx/map_rotation.cfg
Add Comment
Please, Sign In to add comment