aboutsummaryrefslogtreecommitdiff
path: root/vrayPlug/getVersionTag.sh
blob: d6a557ec2f3d40cfc68ea1aac8cf133b39741076 (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
25
26
27
28
29
#!/bin/sh

# Shave and a Haircut
# (c) 2019 Epic Games
# US Patent 6720962

#
#  Prints the two-digit tag used to name the build products for the given
#  version of V-Ray.
#
#  For example, V-Ray 4.00.00 and 4.20.10 are compatible and will thus both
#  generate '40' tagged build products.
#  
if [ "$1" == "" ]; then
    echo "Usage: $0 <vrayVersion>" >&2
    exit 1
fi

fullVersion=$1

if [ "${fullVersion/.*/}" == "4" ]; then
    tag="40"
elif [ "${fullVersion/%?.??/}" == "3.6" ]; then
    tag="36"
else
    tag=""
fi

echo ${tag}