From 1b36211240bc7a4b856db97b33dc34f594b3ea34 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Tue, 25 Jul 2017 18:29:54 +0200 Subject: [PATCH] Fix the script so that the algorithms that have spaces in their name are handled correctly. --- smartgears/dataminer_app/templates/algorithms-updater.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/smartgears/dataminer_app/templates/algorithms-updater.j2 b/smartgears/dataminer_app/templates/algorithms-updater.j2 index 3c49ce2f..f1659905 100644 --- a/smartgears/dataminer_app/templates/algorithms-updater.j2 +++ b/smartgears/dataminer_app/templates/algorithms-updater.j2 @@ -77,7 +77,7 @@ function algorithms_updater() { ALGO_PRESENT= ALGO_NAME=$( echo "$algo" | awk -F \| '{ print $1 }' ) ALGO_BODY=$( echo "$algo" | awk -F \| '{ print $2 }' ) - ALGO_LINE=$( grep $ALGO_NAME $ALGORITHMS_INSTALLED_FILE ) + ALGO_LINE=$( egrep ^"$ALGO_NAME" $ALGORITHMS_INSTALLED_FILE ) ALGO_PRESENT=$? if [ $ALGO_PRESENT -ne 0 ] ; then echo "logger 'algorithms-updater: running the add command of algorithm $ALGO_NAME'" >> $ALGORITHMS_TEMP_SCRIPT.body_