Add a dry-run option to gyp_skia.
authorbungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Fri, 9 May 2014 15:04:18 +0000 (15:04 +0000)
committerbungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Fri, 9 May 2014 15:04:18 +0000 (15:04 +0000)
There are times when I want to do some low-level fiddling with the gyp
command. It's nice to start with whatever the 'default' is, and it's also
nice to peek behind the curtain to see what's going on. To this end,
a '--dry-run' in the argument list will spit out the command to run,
rather than running the command.

R=epoger@google.com

Review URL: https://codereview.chromium.org/278893002

git-svn-id: http://skia.googlecode.com/svn/trunk@14674 2bbb7eff-a529-9590-31e7-b0007b416f81

gyp_skia

index 151fa7b..66adf08 100755 (executable)
--- a/gyp_skia
+++ b/gyp_skia
@@ -129,5 +129,9 @@ if __name__ == '__main__':
   print 'Updating projects from gyp files...'
   sys.stdout.flush()
 
-  # Off we go...
-  sys.exit(gyp.main(args))
+  if '--dry-run' in args:
+    args.remove('--dry-run')
+    print gyp_source_dir, ' '.join(args)
+  else:
+    # Off we go...
+    sys.exit(gyp.main(args))