dotnet-installer/packaging/osx/clisdk/scripts/postinstall
William Li ffcbbbc8c4 Fix ubuntu and mac no permission error
cache folder $HOME/.dotnet is created during the install process and user
use. However .dotnet folder belongs to root for ubuntu and mac due to
sudo -H policy. Override HOME during installation.
2017-08-03 10:34:50 -07:00

21 lines
604 B
Bash
Executable file

#!/bin/sh
#
# Copyright (c) .NET Foundation and contributors. All rights reserved.
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
#
PACKAGE=$1
INSTALL_DESTINATION=$2
INSTALL_TEMP_HOME=/tmp/dotnet-installer
# A temporary fix for the permissions issue(s)
chmod -R 755 $INSTALL_DESTINATION
first_run() {
$INSTALL_DESTINATION/dotnet exec $INSTALL_DESTINATION/sdk/%SDK_VERSION%/dotnet.dll internal-reportinstallsuccess "$1" > /dev/null 2>&1 || true
}
[ -d $INSTALL_TEMP_HOME ] || mkdir $INSTALL_TEMP_HOME
HOME=$INSTALL_TEMP_HOME first_run
exit 0