Only use sudo to create unity license directory if it doesn't already exist. Don't delete license dir after action exits

This commit is contained in:
Andrew Kahr 2023-11-14 16:45:19 -08:00
parent e315ddedca
commit e3eae5b07e

View File

@ -4,8 +4,12 @@
# Create directories for license activation # Create directories for license activation
# #
sudo mkdir /Library/Application\ Support/Unity $UNITY_LICENSE_PATH="/Library/Application\ Support/Unity"
sudo chmod -R 777 /Library/Application\ Support/Unity
if [ -d "$UNITY_LICENSE_PATH"]
sudo mkdir "$UNITY_LICENSE_PATH"
sudo chmod -R 777 "$UNITY_LICENSE_PATH"
fi
ACTIVATE_LICENSE_PATH="$ACTION_FOLDER/BlankProject" ACTIVATE_LICENSE_PATH="$ACTION_FOLDER/BlankProject"
mkdir -p "$ACTIVATE_LICENSE_PATH" mkdir -p "$ACTIVATE_LICENSE_PATH"
@ -21,7 +25,6 @@ source $ACTION_FOLDER/platforms/mac/steps/return_license.sh
# Remove license activation directory # Remove license activation directory
# #
sudo rm -r /Library/Application\ Support/Unity
rm -r "$ACTIVATE_LICENSE_PATH" rm -r "$ACTIVATE_LICENSE_PATH"
# #