mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-08 16:49:58 +00:00
Better macOS postinstall script
This commit is contained in:
@@ -168,6 +168,8 @@ function packageDarwin (platform) {
|
||||
, manifestName
|
||||
, componentName
|
||||
, packageId: `tf.matt.${applicationName}`
|
||||
, executablePath: executablePath[platform]
|
||||
, manifestPath: manifestPath[platform]
|
||||
};
|
||||
|
||||
// Template paths
|
||||
|
||||
@@ -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