Clone of chromium aad1ce808763f59c7a3753e08f1500a104ecc6fd refs/remotes/origin/HEAD
diff --git a/testing/iossim/redirect-stdout.sh b/testing/iossim/redirect-stdout.sh
new file mode 100755
index 0000000..d6c3cf8
--- /dev/null
+++ b/testing/iossim/redirect-stdout.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+# Copyright (c) 2012 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+#
+# This script executes the command given as the first argument, strips
+# cxx_destruct from stdout, and redirects the remaining stdout to the file given
+# as the second argument.
+#
+# Example: Write the text 'foo' to a file called out.txt:
+# RedirectStdout.sh "echo foo" out.txt
+#
+# This script is invoked from iossim.gyp in order to redirect the output of
+# class-dump to a file (because gyp actions don't support redirecting output).
+# This script also removes all lines with cxx_destruct. Perhaps newer versions
+# of class-dump will fix this issue. As of 3.5, 'cxx_destruct' still exists.
+
+if [ ${#} -ne 2 ] ; then
+ echo "usage: ${0} <command> <output file>"
+ exit 2
+fi
+
+$1 | sed /cxx_destruct/d > $2