Files
fx_cast/app/packaging/macos/scripts/postinstall
2018-11-28 07:56:29 +00:00

12 lines
350 B
Bash
Executable File

#!/bin/sh
# If the target location isn't root, we need to rewrite
# the manifest path to point to the user directory.
if [ "$2" != "/" ]; then
manifestPath=$2"/Library/Application Support/Mozilla/NativeMessagingHosts/fx_cast_bridge.json"
sed -i.bak 's,"path": "/Library,"path": "'$2'/Library,g' "$manifestPath"
rm "$manifestPath.bak"
fi
exit 0