mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-09 09:09:58 +00:00
Better macOS postinstall script
This commit is contained in:
@@ -3,9 +3,9 @@
|
||||
# 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/{{{manifestName}}}"
|
||||
sed -i.bak 's,"path": "/Library,"path": "'$2'/Library,g' "$manifestPath"
|
||||
rm "$manifestPath.bak"
|
||||
installedManifestPath=$2"/{{{manifestPath}}}/{{{manifestName}}}"
|
||||
sed -i.bak 's,{{{executablePath}}},'$2'{{{executablePath}}},g' "$installedManifestPath"
|
||||
rm "$installedManifestPath.bak"
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user