mirror of
https://github.com/MLBZ521/MacAdmin.git
synced 2026-03-20 16:00:25 +00:00
v1.1 = Added check for if directory exists
+ Added a check to see if the directory exists, if not create directory (the license directory doesn't exist until the app is launched)
This commit is contained in:
10
Software/Mathematica/license_Mathematica.sh
Normal file → Executable file
10
Software/Mathematica/license_Mathematica.sh
Normal file → Executable file
@@ -3,7 +3,7 @@
|
||||
###################################################################################################
|
||||
# Script Name: license_Mathematica.sh
|
||||
# By: Zack Thompson / Created: 1/10/2018
|
||||
# Version: 1.0 / Updated: 1/10/2018 / By: ZT
|
||||
# Version: 1.1 / Updated: 1/29/2018 / By: ZT
|
||||
#
|
||||
# Description: This script applies the license for Mathematica applications.
|
||||
#
|
||||
@@ -14,11 +14,17 @@
|
||||
##################################################
|
||||
# Define Variables
|
||||
|
||||
licenseFile="/Library/Mathematica/Licensing/mathpass"
|
||||
licenseDirectory="/Library/Mathematica/Licensing"
|
||||
licenseFile="${licenseDirectory}/mathpass"
|
||||
|
||||
##################################################
|
||||
# Create the license file.
|
||||
|
||||
if [[ ! -d "${licenseDirectory}" ]]; then
|
||||
/usr/bin/logger -s "Creating License Directory..."
|
||||
/bin/mkdir -p "${licenseDirectory}"
|
||||
fi
|
||||
|
||||
/usr/bin/logger -s "Creating license file..."
|
||||
|
||||
/bin/cat > "${licenseFile}" <<licenseContents
|
||||
|
||||
Reference in New Issue
Block a user