]> git.pld-linux.org Git - packages/rpm.git/commitdiff
- avoid calling file(1) on empty list (in case .jar contains no .class)
authorElan Ruusamäe <glen@pld-linux.org>
Wed, 11 Apr 2007 09:08:28 +0000 (09:08 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    find-java-req.sh -> 1.9

find-java-req.sh

index 8f800cbebecacc3cd691bffad3356425e0e468a7..0994ebdbbc192cfc8f2f7535ce3f57bb3fc16079 100755 (executable)
@@ -8,6 +8,8 @@
 export PATH="/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin"
 
 javaclassversion() {
+       [ $# -gt 0 ] || return
+
        local ver
        classver=$(file "$@" | grep -o 'compiled Java class data, version [0-9.]*' | awk '{print $NF}' | sort -u)
        [ "$classver" ] || return
This page took 0.041305 seconds and 4 git commands to generate.