From 2547a9c36599d151cb10f8e885ea42f0ea899c6e Mon Sep 17 00:00:00 2001 From: Gerhard Hoffmann Date: Thu, 2 Jun 2022 22:45:08 +0200 Subject: [PATCH] Minor issues. --- opkg.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/opkg.sh b/opkg.sh index 91f9372..6c49c04 100755 --- a/opkg.sh +++ b/opkg.sh @@ -253,13 +253,13 @@ read_atbqt_version () { } # xxx=`read_atbqt_version` # echo $xxx - +# set -x check_atbqt_version () { - if ! `download_opkg_package "atbqt" "atbqt_1.0.0-r1_cortexa9t2hf-neon.ipk"`; then + if ! `download_opkg_package "$1" "$2"`; then return 1 fi - if ! `ar_extract_opkg_package_data "atbqt_1.0.0-r1_cortexa9t2hf-neon.ipk"`; then + if ! `ar_extract_opkg_package_data "$2"`; then return 1 fi @@ -270,11 +270,14 @@ check_atbqt_version () { version=`read_atbqt_version` version=(${version// / }) - if [ "${version[0]}" = "$1" ] && [ "${version[1]}" = "$2" ]; then + if [ "${version[0]}" = "$3" ] && [ "${version[1]}" = "$4" ]; then return 0 fi return 1 } -# check_atbqt_version "20221220_1038_00318q" "4.5.2-65-gf1799aa3_00318/Nexobility_dev" +check_atbqt_version "atbqt" \ + "atbqt_1.0.0-r1_cortexa9t2hf-neon.ipk" \ + "20221220_1038_00318q" \ + "4.5.2-65-gf1799aa3_00318/Nexobility_dev"