Checking for empty mlatResultsFormat.

pull/53/head
Joe Prochazka 2016-01-05 11:24:17 -05:00
rodzic 38b2831dad
commit 0b40925324
1 zmienionych plików z 11 dodań i 0 usunięć

Wyświetl plik

@ -172,6 +172,17 @@ ORIGINALFORMAT=`sudo piaware-config -show | grep mlatResultsFormat | sed 's/mlat
MLATRESULTS=`sed 's/[{}]//g' <<< $ORIGINALFORMAT`
CLEANFORMAT=`sed 's/beast,connect,localhost:30004//g' <<< $MLATRESULTS`
FINALFORMAT="${CLEANFORMAT} beast,connect,localhost:30004" | sed -e 's/^[ \t]*//'
# Make sure that the mlatResultsFormat setting is not left blank if no other settings exist.
if [ -n "$FINALFORMAT" ]; then
sudo piaware-config -mlatResultsFormat "${FINALFORMAT}"
else
sudo piaware-config -mlatResultsFormat "beast,connect,localhost:30004"
fi
exit 0
sudo piaware-config -mlatResultsFormat "${FINALFORMAT}"
echo -e "\033[32m [OK]"