utils/environment: protect against unintentionally wrongly set env var XRAY_VIVADO (#1870)

This commit is contained in:
Unai Martinez-Corral 2022-08-18 04:31:20 +02:00 committed by GitHub
commit 58a39ef1a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -49,7 +49,7 @@ export XRAY_VIVADO="${XRAY_UTILS_DIR}/vivado.sh"
# Verify an approved version is in use
export XRAY_VIVADO_SETTINGS="${XRAY_VIVADO_SETTINGS:-/opt/Xilinx/Vivado/2017.2/settings64.sh}"
# Vivado v2017.2 (64-bit)
if [ $(${XRAY_VIVADO} -h |grep Vivado |cut -d\ -f 2) != "v2017.2" ] ; then
if [ "$(${XRAY_VIVADO} -h |grep Vivado |cut -d\ -f 2)" != "v2017.2" ] ; then
echo "Requires Vivado 2017.2. See https://github.com/SymbiFlow/prjxray/issues/14"
# Can't exit since sourced script
# Trash a key environment variable to preclude use