Advertisement
Guest User

Untitled

a guest
Aug 25th, 2014
325
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.85 KB | None | 0 0
  1. if (($# != 2)); then
  2.     echo "Usage $0 round faction"
  3.     exit
  4. fi
  5.  
  6.  
  7. round=$1
  8. faction=$2
  9.  
  10.  
  11.  
  12. reportname=${round}-$faction.zip
  13. testname=${round}_test-$faction
  14. origname=${round}_orig-$faction
  15.  
  16. if [ ! -d $faction ]; then
  17.     echo "$faction should be a link to your regular report directory"
  18.     exit
  19. fi
  20.  
  21. if [ ! -f $reportname ]; then
  22.     echo "test report $reportname not found"
  23. fi
  24. if [ ! -f $faction/$reportname ]; then
  25.     echo "original report report $faction/$reportname not found"
  26. fi
  27.  
  28. set -x
  29.  
  30. unzip -o $reportname
  31. mv $round-$faction.cr $testname.cr
  32. mv $round-$faction.nr $testname.nr
  33. unzip -o $faction/$reportname
  34. mv $round-$faction.cr $origname.cr
  35. mv $round-$faction.nr $origname.nr
  36.  
  37. sed -i~ "s/^MESSAGE [0-9]*/MESSAGE 000/" $testname.cr
  38. sed -i~ "s/^MESSAGE [0-9]*/MESSAGE 000/" $origname.cr
  39.  
  40. meld $origname.cr $testname.cr
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement