From c2b68606c99b005c0cc214c42438ee7afe24d8e6 Mon Sep 17 00:00:00 2001 From: Ganesh Gore Date: Mon, 8 Feb 2021 14:07:01 -0700 Subject: [PATCH] [Bugfix] Added shell globstar --- openfpga.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/openfpga.sh b/openfpga.sh index c8275b6dc..f0ab701ee 100755 --- a/openfpga.sh +++ b/openfpga.sh @@ -5,7 +5,13 @@ #author : Ganesh Gore #============================================================================== -export OPENFPGA_PATH="$(pwd)" +if [ -z $OPENFPGA_PATH ]; then + echo "OPENFPGA_PATH variable not found" + export OPENFPGA_PATH=$(pwd); + echo "Setting OPENFPGA_PATH=${OPENFPGA_PATH}" +else + echo "OPENFPGA_PATH=${OPENFPGA_PATH}" +fi export OPENFPGA_SCRIPT_PATH="${OPENFPGA_PATH}/openfpga_flow/scripts" export OPENFPGA_TASK_PATH="${OPENFPGA_PATH}/openfpga_flow/tasks" if [ -z $PYTHON_EXEC ]; then export PYTHON_EXEC="python3"; fi @@ -96,6 +102,8 @@ unset-openfpga (){ if [[ $(ps -p $$ -oargs=) == *"zsh"* ]]; then autoload -U +X bashcompinit; bashcompinit; fi + +command -v shopt && shopt -s globstar # TaskList=$(ls -tdalh ${OPENFPGA_TASK_PATH}/* | awk '{system("basename " $9)}' | awk '{printf("%s ",$1)}') TaskList=$(ls -tdalh ${OPENFPGA_TASK_PATH}/**/task.conf | awk '{print $9}' | sed -e "s/\/config\/task.conf//" |