From 04c15d42a98022b303b5c723f58a128e84da865d Mon Sep 17 00:00:00 2001 From: Zack T Date: Mon, 29 Jan 2018 21:47:45 -0700 Subject: [PATCH] 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) --- Software/Mathematica/license_Mathematica.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) mode change 100644 => 100755 Software/Mathematica/license_Mathematica.sh diff --git a/Software/Mathematica/license_Mathematica.sh b/Software/Mathematica/license_Mathematica.sh old mode 100644 new mode 100755 index 133a3b7..807a1b6 --- a/Software/Mathematica/license_Mathematica.sh +++ b/Software/Mathematica/license_Mathematica.sh @@ -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}" <