extract package name from IDMETA
authorWolfram Schneider <wosch@indexdata.dk>
Mon, 31 Oct 2011 20:44:54 +0000 (20:44 +0000)
committerWolfram Schneider <wosch@indexdata.dk>
Mon, 31 Oct 2011 20:44:54 +0000 (20:44 +0000)
id-release

index 0eb2bf7..d888b5d 100755 (executable)
@@ -32,7 +32,7 @@ if [ `ls |egrep '\.spec$' | wc -l` -eq 0 ]; then
     usage
 else
     spec=`ls |egrep '\.spec$' | head -1`
-    package=`basename $spec .spec`
+    package=`perl -ne 's/\s*$//; print if s/^NAME=//' IDMETA`
 fi
 
 case $1 in