algorithms-updater: cleanup the list of installed algorithms even when installing a new one.

This commit is contained in:
Andrea Dell'Amico 2017-09-20 13:42:40 +02:00
parent 3758e0422a
commit 3eed2abc3a
1 changed files with 2 additions and 2 deletions

View File

@ -111,8 +111,8 @@ function algorithms_updater() {
echo 'if [ $RETVAL -ne 0 ] ; then' >> $ALGORITHMS_TEMP_SCRIPT.body_
echo " logger 'algorithms-updater: the adding of algorithm $ALGO_NAME failed'" >> $ALGORITHMS_TEMP_SCRIPT.body_
echo "else" >> $ALGORITHMS_TEMP_SCRIPT.body_
echo " 'egrep -v ^\"$ALGO_NAME \" $ALGORITHMS_INSTALLED_FILE > ${ALGORITHMS_INSTALLED_FILE}_'" >> $ALGORITHMS_TEMP_SCRIPT.body_
echo " 'mv ${ALGORITHMS_INSTALLED_FILE}_ $ALGORITHMS_INSTALLED_FILE'" >> $ALGORITHMS_TEMP_SCRIPT.body_
echo " egrep -v ^\"$ALGO_NAME \" $ALGORITHMS_INSTALLED_FILE > ${ALGORITHMS_INSTALLED_FILE}_" >> $ALGORITHMS_TEMP_SCRIPT.body_
echo " mv ${ALGORITHMS_INSTALLED_FILE}_ $ALGORITHMS_INSTALLED_FILE" >> $ALGORITHMS_TEMP_SCRIPT.body_
echo " echo '$ALGO_NAME | $ALGO_DATE' >> $ALGORITHMS_INSTALLED_FILE" >> $ALGORITHMS_TEMP_SCRIPT.body_
echo " logger 'algorithms-updater: the adding of algorithm $ALGO_NAME succeeded'" >> $ALGORITHMS_TEMP_SCRIPT.body_
echo "fi" >> $ALGORITHMS_TEMP_SCRIPT.body_