Allow selection of a target when using smart sync.

Change-Id: I02a24471b9b62dbba3773f22a289825bc566acd9
diff --git a/subcmds/sync.py b/subcmds/sync.py
index 6f77310..b1945d5 100644
--- a/subcmds/sync.py
+++ b/subcmds/sync.py
@@ -558,7 +558,10 @@
             branch = branch[len(R_HEADS):]
 
           env = os.environ.copy()
-          if 'TARGET_PRODUCT' in env and 'TARGET_BUILD_VARIANT' in env:
+          if 'SYNC_TARGET' in env:
+            target = env['SYNC_TARGET']
+            [success, manifest_str] = server.GetApprovedManifest(branch, target)
+          elif 'TARGET_PRODUCT' in env and 'TARGET_BUILD_VARIANT' in env:
             target = '%s-%s' % (env['TARGET_PRODUCT'],
                                 env['TARGET_BUILD_VARIANT'])
             [success, manifest_str] = server.GetApprovedManifest(branch, target)