Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chrome / common / extensions / docs / examples / api / nativeMessaging / host / uninstall_host.sh
blobdb6b73df890cf157ceaa5d5ca73e6ca161403ed4
1 #!/bin/sh
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
4 # found in the LICENSE file.
6 set -e
8 if [ "$(uname -s)" == "Darwin" ]; then
9 if [ "$(whoami)" == "root" ]; then
10 TARGET_DIR="/Library/Google/Chrome/NativeMessagingHosts"
11 else
12 TARGET_DIR="$HOME/Library/Application Support/Google/Chrome/NativeMessagingHosts"
14 else
15 if [ "$(whoami)" == "root" ]; then
16 TARGET_DIR="/etc/opt/chrome/native-messaging-hosts"
17 else
18 TARGET_DIR="$HOME/.config/google-chrome/NativeMessagingHosts"
22 HOST_NAME=com.google.chrome.example.echo
23 rm "$TARGET_DIR/com.google.chrome.example.echo.json"
24 echo "Native messaging host $HOST_NAME has been uninstalled."