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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/docs/examples/api/nativeMessaging/host/uninstall_host.sh
diff --git a/chrome/common/extensions/docs/examples/api/nativeMessaging/host/uninstall_host.sh b/chrome/common/extensions/docs/examples/api/nativeMessaging/host/uninstall_host.sh
index 5fc4d4c727aa543077e09c40d3a4cdc73adb9c50..db6b73df890cf157ceaa5d5ca73e6ca161403ed4 100755
--- a/chrome/common/extensions/docs/examples/api/nativeMessaging/host/uninstall_host.sh
+++ b/chrome/common/extensions/docs/examples/api/nativeMessaging/host/uninstall_host.sh
@@ -5,21 +5,20 @@
set -e
-if [ $(uname -s) == 'Darwin' ]; then
+if [ "$(uname -s)" == "Darwin" ]; then
if [ "$(whoami)" == "root" ]; then
TARGET_DIR="/Library/Google/Chrome/NativeMessagingHosts"
else
- TARGET_DIR=\
- "$HOME/Library/Application Support/Google/Chrome/NativeMessagingHosts"
+ TARGET_DIR="$HOME/Library/Application Support/Google/Chrome/NativeMessagingHosts"
fi
else
if [ "$(whoami)" == "root" ]; then
TARGET_DIR="/etc/opt/chrome/native-messaging-hosts"
else
- TARGET_DIR='$HOME/.config/google-chrome/NativeMessagingHosts'
+ TARGET_DIR="$HOME/.config/google-chrome/NativeMessagingHosts"
fi
fi
HOST_NAME=com.google.chrome.example.echo
-rm $TARGET_DIR/com.google.chrome.example.echo.json
-echo Native messaging host $HOST_NAME has been uninstalled.
+rm "$TARGET_DIR/com.google.chrome.example.echo.json"
+echo "Native messaging host $HOST_NAME has been uninstalled."
« 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