Model detection improvement

This commit is contained in:
AGG2017 2024-02-20 20:55:39 -05:00
parent 9df1e2d475
commit b3c6df87f2

View file

@ -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