From 6c4c83d8a3ef5c82a5c5b88cc70e696dfafd0b8e Mon Sep 17 00:00:00 2001 From: Romeo-Golf Date: Thu, 22 Dec 2016 17:02:45 +0000 Subject: [PATCH] Fomatting update to rtlsdr-ogn.sh --- bash/decoders/rtlsdr-ogn.sh | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/bash/decoders/rtlsdr-ogn.sh b/bash/decoders/rtlsdr-ogn.sh index 120f6dd..78b5962 100755 --- a/bash/decoders/rtlsdr-ogn.sh +++ b/bash/decoders/rtlsdr-ogn.sh @@ -76,7 +76,7 @@ fi ### CHECK FOR PREREQUISITE PACKAGES -echo -e "\e[95m Installing packages needed to build and fulfill dependencies for ${DECODER_NAME} ...\e[97m" +echo -e "\e[95m Installing packages needed to build and fulfill dependencies for ${DECODER_NAME}...\e[97m" echo -e "" CheckPackage git CheckPackage rtl-sdr @@ -185,32 +185,32 @@ if [[ ${TUNER_COUNT} -gt 1 ]] ; then if [[ -n ${OGN_DEVICE_SERIAL} ]] ; then if [[ `rtl_test 2>&1 | grep -c "SN: ${OGN_DEVICE_SERIAL}" ` -eq 1 ]] ; then OGN_DEVICE_ID=`rtl_test 2>&1 | grep "SN: ${OGN_DEVICE_SERIAL}" | awk -F ":" '{print $1}' | sed -e 's/\ //g' ` - echo -e "\e [94m RTL-SDR with Serial \"${OGN_DEVICE_SERIAL}\" found at device \"${OGN_DEVICE_ID}\" and will be assigned to ${DECODER_NAME} ...\e [97m" + echo -e "\e [94m RTL-SDR with Serial \"${OGN_DEVICE_SERIAL}\" found at device \"${OGN_DEVICE_ID}\" and will be assigned to ${DECODER_NAME}...\e [97m" else - echo -e "\e [94m RTL-SDR with Serial \"${OGN_DEVICE_SERIAL}\" not found, assigning device \"0\" to ${DECODER_NAME} ...\e [97m" + echo -e "\e [94m RTL-SDR with Serial \"${OGN_DEVICE_SERIAL}\" not found, assigning device \"0\" to ${DECODER_NAME}...\e [97m" fi # Or if a device has been specified by device ID then confirm this is currently detected. elif [[ -n ${OGN_DEVICE_ID} ]] ; then if [[ `rtl_test 2>&1 | grep "SN: " | grep -c "^\ *${OGN_DEVICE_ID}:"` -eq 1 ]] ; then - echo -e "\e [94m RTL-SDR device \"${OGN_DEVICE_ID}\" found and will be assigned to ${DECODER_NAME} ...\e [97m" + echo -e "\e [94m RTL-SDR device \"${OGN_DEVICE_ID}\" found and will be assigned to ${DECODER_NAME}...\e [97m" else - echo -e "\e [94m RTL-SDR device \"${OGN_DEVICE_ID}\" not found, assigning device \"0\" to ${DECODER_NAME} ...\e [97m" + echo -e "\e [94m RTL-SDR device \"${OGN_DEVICE_ID}\" not found, assigning device \"0\" to ${DECODER_NAME}...\e [97m" fi # Failing that configure it with device ID 0. else if [[ -z ${OGN_DEVICE_ID} ]] ; then - echo -e "\e [94m No RTL-SDR device specified, assigning device \"0\" to ${DECODER_NAME} ...\e [97m" + echo -e "\e [94m No RTL-SDR device specified, assigning device \"0\" to ${DECODER_NAME}...\e [97m" OGN_DEVICE_ID="0" fi fi # Single tuner present so assign device 0 and stop any other running decoders, or at least dump1090-mutablity for a default install. elif [[ ${TUNER_COUNT} -eq 1 ]] ; then - echo -e "\e [94m Single RTL-SDR device \"0\" detected and assigned to ${DECODER_NAME} ...\e [97m" + echo -e "\e [94m Single RTL-SDR device \"0\" detected and assigned to ${DECODER_NAME}...\e [97m" OGN_DEVICE_ID="0" sudo /etc/init.d/dump1090-mutability stop # No tuners present so assign device 0 and stop any other running decoders, or at least dump1090-mutablity for a default install. elif [[ ${TUNER_COUNT} -lt 1 ]] ; then - echo -e "\e [94m No RTL-SDR device detected so ${DECODER_NAME} will be assigned device \"0\" ...\e [97m" + echo -e "\e [94m No RTL-SDR device detected so ${DECODER_NAME} will be assigned device \"0\"...\e [97m" OGN_DEVICE_ID="0" sudo /etc/init.d/dump1090-mutability stop 2>/dev/null fi @@ -273,6 +273,7 @@ fi if [[ -s $BUILDDIRECTORY_RTLSDROGN/rtlsdr-ogn/${OGN_CALLSIGN}.conf ]] ; then echo -e "\e [94m Existing ${DECODER_NAME} config file \"${OGN_CALLSIGN}.conf\" found...\e [97m" else + echo -e "\e [94m Generating new ${DECODER_NAME} config file as \"${OGN_CALLSIGN}.conf\"...\e [97m" sudo tee $BUILDDIRECTORY_RTLSDROGN/rtlsdr-ogn/${OGN_CALLSIGN}.conf > /dev/null < /dev/null <