mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-11 10:09:59 +00:00
Better macOS postinstall script
This commit is contained in:
@@ -168,6 +168,8 @@ function packageDarwin (platform) {
|
|||||||
, manifestName
|
, manifestName
|
||||||
, componentName
|
, componentName
|
||||||
, packageId: `tf.matt.${applicationName}`
|
, packageId: `tf.matt.${applicationName}`
|
||||||
|
, executablePath: executablePath[platform]
|
||||||
|
, manifestPath: manifestPath[platform]
|
||||||
};
|
};
|
||||||
|
|
||||||
// Template paths
|
// Template paths
|
||||||
|
|||||||
@@ -3,9 +3,9 @@
|
|||||||
# If the target location isn't root, we need to rewrite
|
# If the target location isn't root, we need to rewrite
|
||||||
# the manifest path to point to the user directory.
|
# the manifest path to point to the user directory.
|
||||||
if [ "$2" != "/" ]; then
|
if [ "$2" != "/" ]; then
|
||||||
manifestPath=$2"/Library/Application Support/Mozilla/NativeMessagingHosts/{{{manifestName}}}"
|
installedManifestPath=$2"/{{{manifestPath}}}/{{{manifestName}}}"
|
||||||
sed -i.bak 's,"path": "/Library,"path": "'$2'/Library,g' "$manifestPath"
|
sed -i.bak 's,{{{executablePath}}},'$2'{{{executablePath}}},g' "$installedManifestPath"
|
||||||
rm "$manifestPath.bak"
|
rm "$installedManifestPath.bak"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
Reference in New Issue
Block a user