aboutsummaryrefslogtreecommitdiff
path: root/utils/getMayaVersions.sh
blob: 33afaeb8f37e43a2cc98ca3bcb0ba88b0ccbc68c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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