From b3c6df87f24529d309d3126e64ac8648b69edff8 Mon Sep 17 00:00:00 2001 From: AGG2017 Date: Tue, 20 Feb 2024 20:55:39 -0500 Subject: [PATCH] Model detection improvement --- TOOLS/app_model.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/TOOLS/app_model.sh b/TOOLS/app_model.sh index b28ab76..423590e 100755 --- a/TOOLS/app_model.sh +++ b/TOOLS/app_model.sh @@ -9,9 +9,13 @@ fi app_file="$1" # try to find out the model +offset_pro=$(grep --binary-files=text -m1 -b -o "unmodifiable.cfg" "$app_file" | awk -F: '{print $1}') offset_max=$(grep --binary-files=text -m1 -b -o "unmodifiable_max.cfg" "$app_file" | awk -F: '{print $1}') offset_plus=$(grep --binary-files=text -m1 -b -o "unmodifiable_plus.cfg" "$app_file" | awk -F: '{print $1}') -app_model="K2Pro" +app_model="Unknown" +if [ -n "$offset_pro" ]; then + app_model="K2Pro" +fi if [ -n "$offset_plus" ]; then app_model="K2Plus" fi