diff options
Diffstat (limited to 'utils/getMayaVersions.sh')
| -rw-r--r-- | utils/getMayaVersions.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/utils/getMayaVersions.sh b/utils/getMayaVersions.sh new file mode 100644 index 0000000..33afaeb --- /dev/null +++ b/utils/getMayaVersions.sh @@ -0,0 +1,24 @@ +#!/bin/sh + +# Shave and a Haircut +# (c) 2019 Epic Games +# US Patent 6720962 + +utilsDir=`dirname $0` +arch=`${utilsDir}/getarch.sh` +os=`${utilsDir}/getos.sh` +versionsFile=${utilsDir}/../mayaVersions.linux + +auto= + +if [ "$1" = "auto" ]; then + auto=y +fi + +if [ -r ${versionsFile} ]; then + # Note that we replace the spacing between fields with a single tab so + # callers can use the 'cut' cmd on the output without any fiddling. + grep -v "^[[:space:]]*#" ${versionsFile} | + sed 's/[[:space:]]\+/\t/g' | + grep "^[^[:space:]]\+[[:space:]]\+${arch}[[:space:]]\+[^[:space:]]\+[[:space:]]\+${os}[[:space:]]\+${auto}" +fi |