summaryrefslogtreecommitdiff
path: root/deps/gyp/test/mac/postbuild-defaults/postbuild-defaults.sh
diff options
context:
space:
mode:
Diffstat (limited to 'deps/gyp/test/mac/postbuild-defaults/postbuild-defaults.sh')
-rwxr-xr-xdeps/gyp/test/mac/postbuild-defaults/postbuild-defaults.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/deps/gyp/test/mac/postbuild-defaults/postbuild-defaults.sh b/deps/gyp/test/mac/postbuild-defaults/postbuild-defaults.sh
new file mode 100755
index 0000000000..56af2a8329
--- /dev/null
+++ b/deps/gyp/test/mac/postbuild-defaults/postbuild-defaults.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+# Copyright (c) 2012 Google Inc. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+set -e
+
+# This is the built Info.plist in the output directory.
+PLIST="${BUILT_PRODUCTS_DIR}"/Test.app/Contents/Info # No trailing .plist
+echo $(defaults read "${PLIST}" "CFBundleName") > "${BUILT_PRODUCTS_DIR}/result"
+
+# This is the source Info.plist next to this script file.
+PLIST="${SRCROOT}"/Info # No trailing .plist
+echo $(defaults read "${PLIST}" "CFBundleName") \
+ >> "${BUILT_PRODUCTS_DIR}/result"