Formatting updates to OGN and HAB decoders

pull/334/head
Romeo-Golf 2016-12-30 17:29:25 +00:00
rodzic 99a2971318
commit db1ac56188
1 zmienionych plików z 14 dodań i 10 usunięć

Wyświetl plik

@ -396,16 +396,20 @@ CheckReturnCode
### INSTALL AS A SERVICE
# Check for local copy of service script, otherwise download it.
if [[ `grep -c "conf=${DECODER_SERVICE_SCRIPT_PATH}" ${DECODER_SERVICE_SCRIPT_NAME}` -eq 1 ]] ; then
echo -en "\e[33m Installing and setting permissions on the service script...\t\t"
cp ${DECODER_SERVICE_SCRIPT_NAME} ${DECODER_SERVICE_SCRIPT_PATH}
sudo chmod +x ${DECODER_SERVICE_SCRIPT_PATH} > /dev/null 2>&1
elif [[ `echo ${DECODER_SERVICE_SCRIPT_URL} | grep -c "^http"` -gt 0 ]] ; then
echo -en "\e[33m Downloading and setting permissions on the service script...\t\t"
sudo curl -s ${DECODER_SERVICE_SCRIPT_URL} -o ${DECODER_SERVICE_SCRIPT_PATH}
sudo chmod +x ${DECODER_SERVICE_SCRIPT_PATH} > /dev/null 2>&1
if [[ -f ${DECODER_SERVICE_SCRIPT_NAME} ]] ; then
if [[ `grep -c "conf=${DECODER_SERVICE_SCRIPT_PATH}" ${DECODER_SERVICE_SCRIPT_NAME}` -eq 1 ]] ; then
echo -en "\e[33m Installing and setting permissions on the service script...\t\t"
cp ${DECODER_SERVICE_SCRIPT_NAME} ${DECODER_SERVICE_SCRIPT_PATH}
sudo chmod +x ${DECODER_SERVICE_SCRIPT_PATH} > /dev/null 2>&1
fi
elif [[ -n ${DECODER_SERVICE_SCRIPT_URL} ]] ; then
if [[ `echo ${DECODER_SERVICE_SCRIPT_URL} | grep -c "^http"` -gt 0 ]] ; then
echo -en "\e[33m Downloading and setting permissions on the service script...\t\t"
sudo curl -s ${DECODER_SERVICE_SCRIPT_URL} -o ${DECODER_SERVICE_SCRIPT_PATH}
sudo chmod +x ${DECODER_SERVICE_SCRIPT_PATH} > /dev/null 2>&1
fi
else
echo -en "\e[33m Unable to install service script...\t\t\t\t"
echo -en "\e[33m Unable to install service script...\t\t\t\t\t"
false
fi
CheckReturnCode
@ -442,7 +446,7 @@ CheckReturnCode
### SETUP COMPLETE
# Return to the project root directory.
echo -en "\e[94m Returning to ${RECEIVER_PROJECT_TITLE} root directory...\e[97m"
echo -en "\e[94m Returning to ${RECEIVER_PROJECT_TITLE} root directory...\e[97m\t"
cd ${PROJECT_ROOT_DIRECTORY}
CheckReturnCode