title: Debugging Bash Script: syntax error: unexpected end of file
body: <p>Tried debugging this one a few different ways and bash -x and setting display lines was no help. I screened it for non-ascii chars and still no dice.
  Went through and checked for logical errors and didn't see anything that unterminated or inf loops. I am thinking my getopt syntax is to blame but I followed the guidlines in manpage and couldn't find any issues.</p>
  
  <p>It's a decently long setup script but so I hosted it here:
  <a href="https://s3-us-west-2.amazonaws.com/s.cdpn.io/581149/cdr.sh" rel="nofollow noreferrer">cdr.sh - deployment script</a></p>