title: unix bash syntax error near unexpected token 'do'
body: <p>I created a unix minecraft launcher. it worked perfectly fine just an hour and a half ago (as of 9:30). then I got this:</p>
  
  <pre><code>/home/axium1998/MinecraftMegaLauncher.sh: line 14: syntax error near unexpected token ~'$'do\r''. 
  /home/Axium1998/MinecraftMegaLauncher.sh: line 14: 'do
  </code></pre>
  
  <p>I have no idea what caused this. </p>
  
  <pre><code># If code needs to be changed, just send me a PM saying something like: Project:MinecraftMegaLauncher Line #&lt;line number&gt; = &lt;changed code&gt;
  # if it works (I bet it will, but for me to learn xP )it will be replaced/fixed.
  export mc=$HOME/.minecraft
  export mcB=$HOME/officialBackup
  export tekkit=$HOME/.technic
  export tekkitB=$HOME/tekkitBackup
  export ftb=$HOME/.feedthebeast
  export ftbB=$HOME/ftbBackup
  export options=("Official" "MagicLauncher" "Tekkit" "FTB" "Backup" "Restore" "Quit")
  echo "==========MinecraftMegaLauncher=========="
  echo "This currently supports the following launchers: Official, Magic, Tekkit, and FTB, and doing backups as well!"
  echo "I (AXIUM1998) am not responsible for data loss/corruption while backing up/restoring. (It is still indev)"
  echo "Also, if there is a launcher you want to be in this mega launcher, I will consider implementing them."
  echo "BUG: Running restore twice in a row (running restore, then running it again immeditely) will erase all mc data."
  cd $HOME
  select optL in "${options[@]}"
  do
    case $optL in
      "Official")
        echo "Starting the Official launcher..."
        java -jar minecraft.jar
      ;;
      "MagicLauncher")
        echo "Starting the MagicLauncher..."
        java -jar magic.jar
      ;;
      "Tekkit")
        echo "Starting the Tekkit launcher..."
        java -jar tekkit.jar
      ;;
      "FTB")
        echo "Starting the FTB launcher..."
        java -jar ftb.jar
      ;;
      "Quit")
        echo "Quitting..."
        break
      ;;
      "Backup")
        echo "Starting the backup..."
        echo "Please input your password (Admin needed :( )"
        sudo touch dv
        sudo rm dv
        if [ ! -d $mcB ]; then
          sudo mkdir $HOME/officialBackup
        fi
        if [ ! -d $tekkitB ];then
          sudo mkdir $HOME/tekkitBackup
        fi
        if [ ! -d $ftbB ]; then
          sudo mkdir $HOME/ftbBackup
        fi
        cd $mcB
        sudo rm -rf *
        cd $tekkitB
        sudo rm -rf *
        cd $ftbB
        sudo rm -rf *
        sudo cp -R $mc/* $mcB/
        sudo cp -R $tekkit/* $tekkitB/
        sudo cp -R $ftb/* $ftbB/
        echo "Backup complete"
        echo "Making current user owner of files..."
        sudo chown -R $USER $mcB
        sudo chown -R $USER $tekkitB
        sudo chown -R $USER $ftbB
        echo "User $USER now can write to backed up folders"
      ;;
      "Restore")
        echo "Starting the restoration..."
        echo "Admin is, again, required :( "
        sudo touch dv
        sudo rm dv
        cd $mc
        sudo rm -rf *
        cd $tekkit
        sudo rm -rf *
        cd $ftb
        sudo rm -rf * 
        cd $HOME
        sudo mv  $mcB/* $mc/
        sudo mv  $tekkitB/* $tekkit/
        sudo mv  $ftbB/* $ftb/
        echo "Restore complete"
      ;;
      *)
        echo "Invalid operand.";;
      esac      
  done
  </code></pre>
  
  <p>edit: may not be exact line. I changed it after I last uploaded it</p>