#!/bin/csh # Shave and a Haircut # (c) 2019 Epic Games # US Patent 6720962 set debugOpt = "" set mayaVersions = "" while ("$1" != "") if ("$1" == "debug") then set debugOpt = "debug" else if ("${mayaVersions}" == "") then set mayaVersions = $1 endif shift end set tmpLog=$$.log # # If no explicit version was specified on the command line, then build all # of the maya versions which can be built on this architecture and # operating system version. # if ("${mayaVersions}" == "") then set mayaVersions = `utils/getMayaVersions.sh auto | cut -f 1` # Since we're doing a "full" build, get rid of all the old RPMs. rm -f shaveHaircut_Maya*.rpm endif set prevBaseConfig = "" foreach mayaVersion (${mayaVersions}) # Is this version of maya installed? set foundMaya = "n" set mayaRootDir = "/usr/autodesk" if (-d ${mayaRootDir}/maya${mayaVersion}/include/maya) then set foundMaya = "y" # Do we have the right compiler? set compilerVersion = `utils/getg++.sh -v ${mayaVersion}` set compiler = `utils/getg++.sh ${mayaVersion}` if ("${compiler}" == "") then echo "mklinux:warning: cannot find gcc compiler version needed for Maya ${mayaVersion}. Skipping." else # If we already have a built base and it was built using the # same configuration, then we can just reuse it. Otherwise # we need to rebuild the base. eval 'set baseConfig = "${compilerVersion}"' if ("${baseConfig}" != "${prevBaseConfig}") then ./mklinuxBase ${mayaVersion} ${debugOpt} eval 'set prevBaseConfig = "'${baseConfig}'"' endif echo "mklinuxVersion $mayaVersion $debugOpt build" ./mklinuxVersion ${mayaVersion} ${debugOpt} set result = $status if ($result == 2) then echo "mklinux:warning: skipping Maya $version build" else if ($result != 0) then exit 1; endif endif endif if ("$foundMaya" == "n") then echo "mklinux:warning: Maya ${mayaVersion} not installed. Skipping." endif end # We have several people working on Shave at the moment and we don't want them # posting every time they run a build, so comment this out for now. # #./postlinux exit 0