Fixed small issue in replacing sysroot functionality.
Need to consider that the board name may contain "-"

BUG=None
TEST=Run the script for several boards and verified the copy was happening correctly.

Change-Id: Ic7e34548d65962da11a4ca1cb575fdfb6769feed
Reviewed-on: https://gerrit-int.chromium.org/34400
Reviewed-by: Yunlian Jiang <yunlian@google.com>
Commit-Queue: Luis Lozano <llozano@chromium.org>
Tested-by: Luis Lozano <llozano@chromium.org>
diff --git a/remote_gcc_build.py b/remote_gcc_build.py
index b2dfee3..a72e20d 100755
--- a/remote_gcc_build.py
+++ b/remote_gcc_build.py
@@ -249,7 +249,8 @@
 def ReplaceSysroot(chromeos_root, dest_dir, target):
   """Copy unpacked sysroot and image to chromeos_root."""
   ce = command_executer.GetCommandExecuter()
-  board = target.split("-")[0]
+  # get the board name from "board-release". board may contain "-"
+  board = target.rsplit("-", 1)[0]
   board_dir = os.path.join(chromeos_root, "chroot", "build", board)
   command = "sudo rm -rf {0}".format(board_dir)
   ce.RunCommand(command)
@@ -429,4 +430,3 @@
 if __name__ == "__main__":
   retval = Main(sys.argv)
   sys.exit(retval)
-