Fixed setup_chromeos calling in build_tc.

PRESUBMIT=passed
R=raymes,bjanakiraman
DELTA=7  (4 added, 0 deleted, 3 changed)
RCL=45568-p2
RDATE=2010/12/02 11:59:31


P4 change: 42606760
diff --git a/v14/build_tc.py b/v14/build_tc.py
index 2953312..6351db0 100755
--- a/v14/build_tc.py
+++ b/v14/build_tc.py
@@ -73,11 +73,15 @@
   else:
     options.chromeos_root = os.path.expanduser(options.chromeos_root)
 
-  if not os.path.exists(options.chromeos_root):
+  if ((not os.path.exists(options.chromeos_root)) or
+      (not os.path.exists(options.chromeos_root +
+                          "/src/scripts/enter_chroot.sh"))):
     logger.GetLogger().LogOutput("Creating a chromeos checkout at: %s" %
                                  options.chromeos_root)
-    sc_args = ("--dir=\"%s\" %s" % (options.chromeos_root,
-                                   options.setup_chromeos_options))
+    sc_args = []
+    sc_args.append("--dir=%s" % options.chromeos_root)
+    if options.setup_chromeos_options:
+      sc_args.append(options.setup_chromeos_options)
     setup_chromeos.Main(sc_args)
 
   output = options.output