From 885575fe0efe096dad0a199d86bb08e13a41d898 Mon Sep 17 00:00:00 2001 From: deltaxflux Date: Thu, 16 May 2019 15:01:47 +0200 Subject: [PATCH] Quick fix for driver.sh Easier parsing for driver.sh --- misc/check_device.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/misc/check_device.sh b/misc/check_device.sh index f791867..30107d9 100755 --- a/misc/check_device.sh +++ b/misc/check_device.sh @@ -2,26 +2,26 @@ fluxion_check_ap() { readonly SUPPORT_AP=$(sed -n -e "$(echo $(($1+4)))p" devices.xml | cut -d ">" -f2 | cut -d "<" -f1) - if [ "$SUPPORT_AP" == "n" ];then - echo "false" - fi + echo "$SUPPORT_AP" } fluxion_check_mo() { readonly SUPPORT_MO=$(sed -n -e "$(echo $(($1+6)))p" devices.xml | cut -d ">" -f2 | cut -d "<" -f1) - if [ "$SUPPORT_MO" == "n" ];then - echo "false" - fi + echo "$SUPPORT_MO" } # first identifier fluxion_check_chipset() { declare -r LINE=$(grep "$1" devices.xml -n | head -n 1 | cut -d ":" -f1) - if [ "$(fluxion_check_ap "$LINE")" == "false" ] || [ "$(fluxion_check_mo "$LINE")" == "false" ];then + if [ "$(fluxion_check_ap "$LINE")" == "n" ] || [ "$(fluxion_check_mo "$LINE")" == "n" ];then echo "false" else - echo "true" + if [ "$(fluxion_check_ap "$LINE")" == "?" ] || [ "$(fluxion_check_mo "$LINE")" == "?" ];then + echo "Chipset not in list" + else + echo "true" + fi fi }