Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(100)

Side by Side Diff: chrome/common/extensions/docs/examples/api/nativeMessaging/host/uninstall_host.sh

Issue 824783004: Fix string escaping in (un)install scripts of native messaging example (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/common/extensions/docs/examples/api/nativeMessaging/host/install_host.sh ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/sh 1 #!/bin/sh
2 # Copyright 2013 The Chromium Authors. All rights reserved. 2 # Copyright 2013 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 set -e 6 set -e
7 7
8 if [ $(uname -s) == 'Darwin' ]; then 8 if [ "$(uname -s)" == "Darwin" ]; then
9 if [ "$(whoami)" == "root" ]; then 9 if [ "$(whoami)" == "root" ]; then
10 TARGET_DIR="/Library/Google/Chrome/NativeMessagingHosts" 10 TARGET_DIR="/Library/Google/Chrome/NativeMessagingHosts"
11 else 11 else
12 TARGET_DIR=\ 12 TARGET_DIR="$HOME/Library/Application Support/Google/Chrome/NativeMessagingH osts"
13 "$HOME/Library/Application Support/Google/Chrome/NativeMessagingHosts"
14 fi 13 fi
15 else 14 else
16 if [ "$(whoami)" == "root" ]; then 15 if [ "$(whoami)" == "root" ]; then
17 TARGET_DIR="/etc/opt/chrome/native-messaging-hosts" 16 TARGET_DIR="/etc/opt/chrome/native-messaging-hosts"
18 else 17 else
19 TARGET_DIR='$HOME/.config/google-chrome/NativeMessagingHosts' 18 TARGET_DIR="$HOME/.config/google-chrome/NativeMessagingHosts"
20 fi 19 fi
21 fi 20 fi
22 21
23 HOST_NAME=com.google.chrome.example.echo 22 HOST_NAME=com.google.chrome.example.echo
24 rm $TARGET_DIR/com.google.chrome.example.echo.json 23 rm "$TARGET_DIR/com.google.chrome.example.echo.json"
25 echo Native messaging host $HOST_NAME has been uninstalled. 24 echo "Native messaging host $HOST_NAME has been uninstalled."
OLDNEW
« no previous file with comments | « chrome/common/extensions/docs/examples/api/nativeMessaging/host/install_host.sh ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698