Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-updates-src > by-pkgid > c454047046288fa22cc04811dc0287e0 > files > 59

rpm-4.12.0.1-20.3.mga5.src.rpm

--- a/scripts/script.req	2014-09-23 14:43:24.191929373 +0200
+++ b/scripts/script.req	2014-09-23 14:56:18.375898758 +0200
@@ -37,8 +39,12 @@
 		   arg=`head -n 1 $filename | grep '^#!' | sed -e 's/^\#\![   ]*//' | cut -d" " -f2`
 		   INTERP="`which $arg 2>/dev/null || echo $INTERP`"
 	    fi
-	    echo $INTERP|grep -Ev $BLACKLIST
-
+	    PKG=$(rpm -qf --qf '%{name}' $INTERP 2>/dev/null)
+	    if [ -n "$PKG" ]; then
+		    echo $PKG|grep -Ev $BLACKLIST
+	    else
+		    echo $INTERP|grep -Ev $BLACKLIST
+	    fi
     fi
     #!/usr/bin/env /foo/bar
     sed -n -e '1s:^#![[:space:]]*[^[:space:]]*/bin/env[[:space:]]\{1,\}\(/[^[:space:]]\{1,\}\):\1:p' "$filename"