From d5ef1be9bd6029bf88a4c857ef9d7492c7cbadd2 Mon Sep 17 00:00:00 2001
From: donker <donker@astron.nl>
Date: Tue, 8 Oct 2019 10:13:51 +0200
Subject: [PATCH] modified argument order in calling qsys-generate script

---
 core/generate_ip_libs        | 5 +++--
 core/hdl_libraries_wizard.py | 1 +
 set_config_path              | 2 +-
 set_config_variable          | 2 +-
 set_hdllib_variable          | 2 +-
 5 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/core/generate_ip_libs b/core/generate_ip_libs
index 5f5ccba..e4e4d66 100755
--- a/core/generate_ip_libs
+++ b/core/generate_ip_libs
@@ -80,8 +80,8 @@ def run_qsys(buildset, outputdir, hdllib, vhdl_files, options):
         script += 'cd %s\n' % hdllib.location
         script += 'set -o pipefail\n'
         # echo line without 'Info:' to make sure grep it's exit code is 0
-        script += '(echo " " ; qsys-generate %s %s --output-directory=%s %s 2>&1) | grep -iv Info:\n' \
-                  % (options, extra_options, outputdir, vhdl_file)
+        script += '(echo " " ; qsys-generate %s %s %s --output-directory=%s 2>&1) | grep -iv Info:\n' \
+                  % (vhdl_file, options, extra_options, outputdir)
         script += 'exit_code=$?\n'
         script += 'exit $exit_code\n'
         # execute script
@@ -184,6 +184,7 @@ if __name__ == '__main__':
                         err_code = run_qmegawiz(args.buildset, outputdir, ip_lib_info, vhdl_files, tool_options)
                     elif ip_tool == 'qsys-generate':
                         err_code = run_qsys(args.buildset, outputdir, ip_lib_info, vhdl_files, tool_options)
+
                     elif ip_tool == 'quartus_sh':
                         err_code = run_quartus_sh(args.buildset, outputdir, ip_lib_info, vhdl_files, tool_options)
                     else:
diff --git a/core/hdl_libraries_wizard.py b/core/hdl_libraries_wizard.py
index 558e6c0..fe8241a 100644
--- a/core/hdl_libraries_wizard.py
+++ b/core/hdl_libraries_wizard.py
@@ -533,6 +533,7 @@ class HdlLibrariesWizard:
                 for fpn_io in file_io:
                     sourcePathName  = cm.expand_file_path_name(fpn_io[0], lib_path)
                     destinationPath = cm.expand_file_path_name(fpn_io[1], build_dir_path)
+                    # print("Copy '{}'' to '{}'".format(sourcePathName, destinationPath))
                     if isfile(sourcePathName):
                         file_count += 1
                         shutil.copy(sourcePathName, destinationPath)     # copy file
diff --git a/set_config_path b/set_config_path
index 3da2d7c..2febd0b 100644
--- a/set_config_path
+++ b/set_config_path
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 ###############################################################################
 #
 # Copyright (C) 2018
diff --git a/set_config_variable b/set_config_variable
index 737e98a..8ce3273 100644
--- a/set_config_variable
+++ b/set_config_variable
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 ###############################################################################
 #
 # Copyright (C) 2018
diff --git a/set_hdllib_variable b/set_hdllib_variable
index aed10a6..08cdae6 100644
--- a/set_hdllib_variable
+++ b/set_hdllib_variable
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 ###############################################################################
 #
 # Copyright (C) 2018
-- 
GitLab