Corrected get_pkg_name not woriking for udev
authorgobo72 <gobo72@364a67c3-989e-7be9-548d-dae8560ea662>
Tue, 2 Nov 2010 04:46:26 +0000 (04:46 +0000)
committergobo72 <gobo72@364a67c3-989e-7be9-548d-dae8560ea662>
Tue, 2 Nov 2010 04:46:26 +0000 (04:46 +0000)
functions

index 10c5693..9a6496f 100644 (file)
--- a/functions
+++ b/functions
@@ -130,7 +130,8 @@ get_pkg_name()
        return 1
     fi
 
-    echo ${1} | sed "s!^\(.*\)-[0-9]*\.[0-9]*.*!\1!g"
+    # \1 matches anything followed by a dash and a number
+    echo ${1} | sed "s!^\(.*\)-[0-9].*!\1!g"
 }
 
 # Saves the content of CFLAGS and CXXFLAGS environment variables.