#!/bin/sh # Shave and a Haircut # (c) 2019 Epic Games # US Patent 6720962 # Returns the value of a V-Ray build configuration variable for a given version of Maya # # getMayaConfig # # The available config variables are: # # makefileRoot - the OS-specific portion of the Makefile names used to build the V-Ray # plugins and shaders for this version of Maya. (We should do away with # this at some point and use the 'osTag' value for the Makefile names.) # e.g. 'osxMavericks' # # osTag - string used to identify different versions of the operating system # in file paths. # e.g. 'mavericks' # # versionDB - path to the file containing the list of V-Ray versions that Shave # supports for each version of Maya. # e.g. vrayPlug/supportedVrayVersions.txt # # versionRanges - list of V-Ray version ranges supported by this version of Maya # e.g. '3.10.00/3.10.99 3.60.00/3.60.99' # # versions - same as 'versionRanges' but only giving the starting versions of the # ranges # e.g. '3.10.00 3.60.00' # # versionTags - list of the shortened version numbers Chaos uses to tag various files # e.g. '36 40' # mayaVersion=$1 variable=$2 versionDB=`dirname $0`/supportedVrayVersions.txt if [ "$2" == "" ]; then echo "Usage: $0 " >&2 exit 1 fi case ${variable} in makefileRoot) # Currently all supported versions of Maya use mavericks-compatible versions of V-Ray. echo "osxMavericks" ;; osTag) # Currently all supported versions of Maya use mavericks-compatible versions of V-Ray. echo "mavericks" ;; versionDB) echo ${versionDB} ;; versionRanges) grep "^${mayaVersion}:" ${versionDB} | sed -e 's?^[^:]*:[ \t]*??' -e 's?/[^ \b]*??g' -e 's?[ \t][ \t]*\([^ \t]*\)[ \t].*$?/\1?' ;; versions) grep "^${mayaVersion}:" ${versionDB} | sed -e 's?^[^:]*:[ \t]*??' -e 's?[ \t].*$??' ;; versionTags) for v in `grep "^${mayaVersion}:" ${versionDB} | sed -e 's?^[^:]*:[ \t]*??' -e 's?[ \t].*$??'`; do `dirname $0`/getVersionTag.sh $v done ;; *) echo "$0: Unknown configuration variable '${variable}'." exit 2 esac