mirror of
https://github.com/MLBZ521/MacAdmin.git
synced 2026-09-17 06:00:38 +01:00
v1.1 = Using the build script to edit the deployment scripts
+ Set the install directory based on the Major Version in install_SPSS.sh + Set the version that is being updated based on the Major Version in update_SPSS.sh
This commit is contained in:
@@ -3,9 +3,9 @@
|
||||
###################################################################################################
|
||||
# Script Name: build_SPSS.sh
|
||||
# By: Zack Thompson / Created: 1/5/2018
|
||||
# Version: 1.0 / Updated: 1/5/2018 / By: ZT
|
||||
# Version: 1.1 / Updated: 1/8/2018 / By: ZT
|
||||
#
|
||||
# Description: This script uses munkpkg to build an SPSS Package.
|
||||
# Description: This script uses munkpkg to build an SPSS package.
|
||||
#
|
||||
###################################################################################################
|
||||
|
||||
@@ -16,13 +16,17 @@
|
||||
|
||||
softwareTitle="SPSSStatistics"
|
||||
|
||||
# Set working directory
|
||||
scriptDirectory=$(/usr/bin/dirname "$(/usr/bin/stat -f "$0")")
|
||||
# Switches
|
||||
switch1="${1}" # Build Type
|
||||
switch2="${2}" # Version
|
||||
switch3="${3}" # Version Value
|
||||
|
||||
# Set working directory
|
||||
scriptDirectory=$(/usr/bin/dirname "$(/usr/bin/stat -f "$0")")
|
||||
|
||||
# Get the Major Version
|
||||
majorVersion=$(/bin/echo "${switch3}" | /usr/bin/awk -F "." '{print $1}')
|
||||
|
||||
##################################################
|
||||
# Setup Functions
|
||||
|
||||
@@ -71,6 +75,9 @@ case $switch1 in
|
||||
/bin/cp "${scriptDirectory}"/install_SPSS.sh "${scriptDirectory}"/scripts/postinstall
|
||||
/bin/cp "${scriptDirectory}"/build/$switch3/* "${scriptDirectory}"/scripts/
|
||||
|
||||
# Set the desired install directory
|
||||
/usr/bin/sed -i '' 's,USER_INSTALL_DIR=,'"USER_INSTALL_DIR=/Applications/SPSS Statistics ${majorVersion}/"',' "${scriptDirectory}"/scripts/installer.properties
|
||||
|
||||
# Function munkiBuild
|
||||
munkiBuild
|
||||
;;
|
||||
@@ -78,6 +85,9 @@ case $switch1 in
|
||||
/bin/cp "${scriptDirectory}"/update_SPSS.sh "${scriptDirectory}"/scripts/postinstall
|
||||
/bin/cp "${scriptDirectory}"/build/$switch3/* "${scriptDirectory}"/scripts/
|
||||
|
||||
# Set the version in the update_SPSS.sh script
|
||||
/usr/bin/sed -i '' 's/version=/'"version=${majorVersion}"'/' "${scriptDirectory}"/scripts/update_SPSS.sh
|
||||
|
||||
# Function munkiBuild
|
||||
munkiBuild
|
||||
;;
|
||||
|
||||
Reference in New Issue
Block a user