From ba83f41d5d899e2e6f3e521b5b489123aa24b720 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 13 Mar 2019 00:53:19 +0300 Subject: Add support for 16.0 --- msvc-dispatch | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'msvc-dispatch') diff --git a/msvc-dispatch b/msvc-dispatch index 5180487..984a1a5 100755 --- a/msvc-dispatch +++ b/msvc-dispatch @@ -13,24 +13,27 @@ function info () { echo "$*" 1>&2; } function error () { info "$*"; exit 1; } # Split the argument. The itself should be [minor] where -# is digit-dot-only and minor should start with a non-digit-dot (e.g., -# u1, rc1, etc). +# is digit-only and minor should start with the dot (e.g., .0). # arg=($(echo "$(basename "$src_exe")" | \ - sed -n -e 's/^\([^-]*\)-\([0-9.]*\)\([^-]*\)-\([^-]*\)$/\1 \4 \2 \3/p')) + sed -n -e 's/^\([^-]*\)-\([0-9]*\)\(\.[^-]\{1,\}\)\{0,1\}-\([^-]*\)$/\1 \4 \2 \3/p')) tool="${arg[0]}" target="${arg[1]}" major="${arg[2]}" minor="${arg[3]}" -MAJOR="${arg[2]^^}" -MINOR="${arg[3]^^}" +MAJOR="${major^^}" +MINOR="${minor^^}" if [ -z "$tool" -o -z "$major" -o -z "$target" ]; then error "invalid top-level script name" fi +# For the minor version used in variable names replace dots with underscores. +# +MINOR="$(echo "$MINOR" | sed -e 's/\./_/g')" + # Calculate MSVC_{WINEPREFIX,INSTALLDIR,SDKVERSION}. # # We have the following environment variable name hierarchy: -- cgit v1.1