#!/bin/sh # Shave and a Haircut # (c) 2019 Epic Games # US Patent 6720962 # Returns the value of an Arnold build configuration variable for a given version of Maya # # getMayaConfig # # The available config variables are: # # versionDB - path to the file containing the list of Arnold versions that Shave # supports for each version of Maya. # e.g. arnold/supportedArnoldVersions.txt # # versionRanges - list of mtoa version ranges supported by this version of Maya # e.g. '1.3.0.0/1.3.0.9 2.1.0.0/3.0.9.9' # # versions - same as 'versionRanges' but only giving the starting versions of the # ranges # e.g. '31000 36000' # # TODO: For Arnold we need to know the version numbers for both mtoa and Arnold itself. So 'versionDB' # is the only useful variable at the moment. # mayaVersion=$1 variable=$2 versionDB=`dirname $0`/supportedMtoAVersions.txt if [ "$2" == "" ]; then echo "Usage: $0 " >&2 exit 1 fi case ${variable} in versionDB) echo ${versionDB} ;; versionRanges) grep "^${mayaVersion}:" ${versionDB} | sed 's/^[^:]*:[ \t]*//' ;; versions) grep "^${mayaVersion}:" ${versionDB} | sed -e 's?^[^:]*:[ \t]*??' -e 's?/[^ \t]*??g' ;; *) echo "$0: Unknown configuration variable '${variable}'." exit 2 esac