fpga: tools: Add utility to upgrade TCL-based BD

Original-commit: a99bed698576c1e0ab6c6c6aae68d5da75e6bd75
This commit is contained in:
Sam O'Brien
2022-08-25 13:55:30 -05:00
committed by skooNI
parent 81bb2ae28f
commit 187c81719b
3 changed files with 53 additions and 4 deletions
+11 -1
View File
@@ -40,12 +40,22 @@ function print_color {
# Functions
#------------------------------------------
export VLINT_PLATFORM=$(uname -o)
function resolve_vlint_path {
if [[ $VLINT_PLATFORM = "Cygwin" ]]; then
echo $(cygpath -am $1)
else
echo $1
fi
}
# Replace any directories with the files they include
function replace_dirs_with_source {
for file in "$@"
do
if [ -d $file ]; then
echo "$(realpath $(find $file -maxdepth 1 -type f)) "
# Quotes so that resolve_vlint_path converts all paths
echo "$(resolve_vlint_path "$(realpath $(find $file -maxdepth 1 -type f))") "
else
echo "$file "
fi