Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions tools/packaging/packaging.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -1210,6 +1210,12 @@ function New-AfterScripts
New-Item -Force -ItemType SymbolicLink -Target "/usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.2" -Path "$Staging/libcrypto.so.1.0.0" > $null
}
}
elseif ($Environment.IsMacOS) {
# NOTE: The macos pkgutil doesn't support uninstall actions so we did not implement it.
# Handling uninstall can be done in Homebrew so we'll take advantage of that in the brew formula.
$AfterInstallScript = [io.path]::GetTempFileName()
$packagingStrings.MacOSAfterInstallScript -f "$Link" | Out-File -FilePath $AfterInstallScript -Encoding ascii
}

return [PSCustomObject] @{
AfterInstallScript = $AfterInstallScript
Expand Down
10 changes: 10 additions & 0 deletions tools/packaging/packaging.strings.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,16 @@ case "$1" in
remove-shell "{0}"
;;
esac
'@

MacOSAfterInstallScript = @'
#!/bin/bash

if [ ! -f /etc/shells ] ; then
echo "{0}" > /etc/shells
else
grep -q "^{0}$" /etc/shells || echo "{0}" >> /etc/shells
fi
'@

MacOSLauncherScript = @'
Expand Down