#!/bin/csh # Shave and a Haircut # (c) 2019 Epic Games # US Patent 6720962 set defaultVersions = (2017 2018) set versionsToBuild="" set nopost= while ("$1" != "") set versionsToBuild = (${versionsToBuild} $1) shift end set tmpLog=$$.log rm -f $tmpLog >& /dev/null rm -rf shaveHaircut_Maya*.pkg >& /dev/null rm -f shaveHaircut_Maya*.pkg.zip >& /dev/null set osxVersion = `sw_vers | grep ProductVersion | sed 's/^[^0-9]*//'` set osxVersionMinor = `echo $osxVersion | cut -d . -f 2` # Build the base, which is the same for all versions of Maya. ./mkosxBase # Build the Maya-specific bits. if ("${versionsToBuild}" == "") then if ($osxVersionMinor >= 4) then set versionsToBuild = (${defaultVersions}) endif endif set prevBuildEnv = "none" foreach version ($versionsToBuild) setenv MAYA_LOCATION `utils/getMayaLocation.sh ${version}` if ("${MAYA_LOCATION}" != "") then # To speed things up, we only rebuild libexe if it needs a # different build environment from the last one we built. set buildEnvNeeded = `./getosxSDKROOT.sh` if ("${prevBuildEnv}" != "${buildEnvNeeded}") then set reuseLibexe = "" set prevBuildEnv = "${buildEnvNeeded}" else set reuseLibexe = "reuseLibexe" endif ./mkosxVersion ${version} ${reuseLibexe} set result = $status if ($result == 2) then echo "mkosx:warning: skipping Maya $version build" else if ($result != 0) then exit 1; endif else echo "mkosx:info: Maya ${version} not installed. Skipping..." endif end exit 0