Created
November 4, 2014 13:39
-
-
Save saiarcot895/a80e0fb8725a1844dc34 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set -e | |
DIR="$( cd "$( dirname "$0" )" && pwd )" | |
TARGET_DIR="$HOME/.config/google-chrome/NativeMessagingHosts" | |
# If you use Chromium, uncomment the next line, and comment the previous line | |
# TARGET_DIR="$HOME/.config/chromium/NativeMessagingHosts" | |
HOST_NAME=com.initiated.chrome_libnotify_notifications | |
# Create directory to store native messaging host. | |
mkdir -p $TARGET_DIR | |
# Copy native messaging host manifest. | |
cp "$DIR/$HOST_NAME.json" "$TARGET_DIR" | |
# Update host path in the manifest. | |
HOST_PATH=$DIR/invoke_notify | |
ESCAPED_HOST_PATH=${HOST_PATH////\\/} | |
sed -i -e "s/HOST_PATH/$ESCAPED_HOST_PATH/" $TARGET_DIR/$HOST_NAME.json | |
# Set permissions for the manifest so that all users can read it. | |
chmod o+r $TARGET_DIR/$HOST_NAME.json | |
echo Native messaging host $HOST_NAME has been installed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am getting: