fix version parsing bug in "ipkg upgrade"
authorMike Baker <mbm@openwrt.org>
Tue, 8 Mar 2005 07:12:32 +0000 (07:12 +0000)
committerMike Baker <mbm@openwrt.org>
Tue, 8 Mar 2005 07:12:32 +0000 (07:12 +0000)
SVN-Revision: 355

openwrt/target/default/target_skeleton/bin/ipkg

index 19454192b85f8b2981013bf763d0977f73eaa9b3..6ceb9d457460225d4efb8622a79038d9f8111129 100755 (executable)
@@ -21,8 +21,8 @@ set -o noglob
 
 ipkg_is_upgrade () {
   local A B a b
-  A=$(echo $1 | sed "s/[0-9]*/ & /g")
-  B=$(echo $2 | sed "s/[0-9]*/ & /g")
+  A=$(echo $1 | sed "s/[0-9]*/ & /g" | sed "s/[^ A-Za-z0-9]//g")
+  B=$(echo $2 | sed "s/[0-9]*/ & /g" | sed "s/[^ A-Za-z0-9]//g")
   while [ \! -z "$A" ] && [ \! -z "$B" ]; do {
     set $A; a=$1; shift; A=$*
     set $B; b=$1; shift; B=$*