OLD | NEW |
1 #!/bin/sh | 1 #!/bin/sh |
2 # Copyright 2014 The Chromium Authors. All rights reserved. | 2 # Copyright 2014 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 # | 5 # |
6 # Script that can be used to register native messaging hosts in the output | 6 # Script that can be used to register native messaging hosts in the output |
7 # directory. | 7 # directory. |
8 | 8 |
9 set -e | 9 set -e |
10 | 10 |
(...skipping 16 matching lines...) Expand all Loading... |
27 sed -e "s#{{ ${host_path_var_name} }}#${host_path}#g" \ | 27 sed -e "s#{{ ${host_path_var_name} }}#${host_path}#g" \ |
28 < "$manifest_template" > "$target_manifest" | 28 < "$manifest_template" > "$target_manifest" |
29 } | 29 } |
30 | 30 |
31 register_hosts() { | 31 register_hosts() { |
32 local build_dir="$1" | 32 local build_dir="$1" |
33 local chrome_data_dir="$2" | 33 local chrome_data_dir="$2" |
34 | 34 |
35 install_manifest \ | 35 install_manifest \ |
36 "${SRC_DIR}/remoting/host/setup/${ME2ME_HOST_NAME}.json.jinja2" \ | 36 "${SRC_DIR}/remoting/host/setup/${ME2ME_HOST_NAME}.json.jinja2" \ |
37 "${build_dir}/remoting_native_messaging_host" \ | 37 "${build_dir}/native_messaging_host" \ |
38 ME2ME_HOST_PATH "${chrome_data_dir}" | 38 ME2ME_HOST_PATH "${chrome_data_dir}" |
39 | 39 |
40 install_manifest \ | 40 install_manifest \ |
41 "${SRC_DIR}/remoting/host/it2me/${IT2ME_HOST_NAME}.json.jinja2" \ | 41 "${SRC_DIR}/remoting/host/it2me/${IT2ME_HOST_NAME}.json.jinja2" \ |
42 "${build_dir}/remoting_it2me_native_messaging_host" \ | 42 "${build_dir}/remote_assistance_host" \ |
43 IT2ME_HOST_PATH "${chrome_data_dir}" | 43 IT2ME_HOST_PATH "${chrome_data_dir}" |
44 } | 44 } |
45 | 45 |
46 register_hosts_for_all_channels() { | 46 register_hosts_for_all_channels() { |
47 local build_dir="$1" | 47 local build_dir="$1" |
48 | 48 |
49 if [ $(uname -s) == "Darwin" ]; then | 49 if [ $(uname -s) == "Darwin" ]; then |
50 register_hosts "${build_dir}" \ | 50 register_hosts "${build_dir}" \ |
51 "${HOME}/Library/Application Support/Google/Chrome/NativeMessagingHosts" | 51 "${HOME}/Library/Application Support/Google/Chrome/NativeMessagingHosts" |
52 register_hosts "${build_dir}" \ | 52 register_hosts "${build_dir}" \ |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 exit 0 | 105 exit 0 |
106 ;; | 106 ;; |
107 *) | 107 *) |
108 print_usage | 108 print_usage |
109 exit 1 | 109 exit 1 |
110 ;; | 110 ;; |
111 esac | 111 esac |
112 fi | 112 fi |
113 | 113 |
114 register_hosts_for_all_channels "${SRC_DIR}/out/${build_dir}" | 114 register_hosts_for_all_channels "${SRC_DIR}/out/${build_dir}" |
OLD | NEW |