summaryrefslogtreecommitdiffstats
path: root/chrome/tools/mac_copy_grit_resources.sh
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/tools/mac_copy_grit_resources.sh')
-rwxr-xr-xchrome/tools/mac_copy_grit_resources.sh37
1 files changed, 37 insertions, 0 deletions
diff --git a/chrome/tools/mac_copy_grit_resources.sh b/chrome/tools/mac_copy_grit_resources.sh
new file mode 100755
index 0000000..936e221
--- /dev/null
+++ b/chrome/tools/mac_copy_grit_resources.sh
@@ -0,0 +1,37 @@
+#!/bin/sh
+
+# Copyright (c) 2009 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.
+
+set -ex
+GENERATED_DIR="${CONFIGURATION_TEMP_DIR}/generated"
+REPACKED_DIR="${GENERATED_DIR}/grit_repacked"
+APP_RESOURCES_ROOT_DIR="${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
+mkdir -p "${APP_RESOURCES_ROOT_DIR}"
+
+
+if [ "${APP_RESOURCES_ROOT_DIR}/chrome.pak" -ot \
+ "${REPACKED_DIR}/chrome.pak" ]
+then
+ cp -f "${REPACKED_DIR}/chrome.pak" \
+ "${APP_RESOURCES_ROOT_DIR}/chrome.pak"
+fi
+
+if [ "${APP_RESOURCES_ROOT_DIR}/theme.pak" -ot \
+ "${REPACKED_DIR}/theme.pak" ]
+then
+ cp -f "${REPACKED_DIR}/theme.pak" \
+ "${APP_RESOURCES_ROOT_DIR}/theme.pak"
+fi
+
+# TODO: this should loop though all the languages and copy them to the
+# right folder (note the name change)
+
+if [ "${APP_RESOURCES_ROOT_DIR}/locale.pak" -ot \
+ "${REPACKED_DIR}/locale_en-US.pak" ]
+then
+ mkdir -p "${APP_RESOURCES_ROOT_DIR}/English.lproj"
+ cp -f "${REPACKED_DIR}/locale_en-US.pak" \
+ "${APP_RESOURCES_ROOT_DIR}/English.lproj/locale.pak"
+fi