Skip to content
Merged
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
16 changes: 7 additions & 9 deletions src/installer/pkg/sfx/installers/osx_scripts/host/postinstall
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,19 @@

PACKAGE=$1
INSTALL_DESTINATION=$2
[ "${InstallerTargetArchitecture}" == "x64" ] && X64_INSTALL_DESTINATION=$2 || X64_INSTALL_DESTINATION=$2/x64

# A temporary fix for the permissions issue(s)
chmod 755 $INSTALL_DESTINATION/dotnet

if [ -e /etc/dotnet/install_location ]; then
# clear out any entries for this architecture if they exist
sed -i old '/^${InstallerTargetArchitecture}=/d' /etc/dotnet/install_location
else
mkdir -p /etc/dotnet
fi

echo ${InstallerTargetArchitecture}=$INSTALL_DESTINATION | tee -a /etc/dotnet/install_location
mkdir -p /etc/dotnet
# set install_location (legacy location) to x64 location (regardless of wether or not we're installing x64)
echo $X64_INSTALL_DESTINATION | tee /etc/dotnet/install_location
# set install_location_arch to point to this installed location
echo $INSTALL_DESTINATION | tee /etc/dotnet/install_location_${InstallerTargetArchitecture}

# if we're running on the native architecture
if [[ "$(uname -m)" =~ "${UnameMachineRegex}" ]]; then
if [[ "$(uname -m)" =~ ${UnameMachineRegex} && "$(sysctl -i -n sysctl.proc_translated)" != "1" ]]; then
# Add the installation directory to the system-wide paths
# But first create the directory if it doesn't exist
mkdir -p /etc/paths.d
Expand Down