]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
UBUNTU: [debian] get-firmware: Filter new files through fwinfo
authorTim Gardner <tim.gardner@canonical.com>
Wed, 28 Nov 2012 16:41:56 +0000 (09:41 -0700)
committerTim Gardner <tim.gardner@canonical.com>
Mon, 20 Feb 2017 03:57:58 +0000 (20:57 -0700)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
debian/scripts/misc/get-firmware

index 3d49e289468cca07f95a5562eee8db9217b0415d..4b903f7ce6e8110ed1f8376c5cbea9de1d26c16d 100755 (executable)
@@ -18,6 +18,17 @@ then
        echo You must run this script from the root of the repo
        exit 1
 fi
+. debian/debian.env
+
+NFWINFO="`find $DEBIAN -name fwinfo|wc -l`"
+if [ ! "$NFWINFO" = "1" ]
+then
+       echo Your repo is hosed. There can only be one fwinfo file.
+       find $DEBIAN -name fwinfo
+       exit 1
+fi
+
+FWINFO="`pwd`/`find $DEBIAN -name fwinfo`"
 
 CDIR=`pwd`
 OFW=$1
@@ -30,12 +41,15 @@ cd $NFW
 (find . -type f | egrep -v "debian|git|LICEN|WHEN|READ|Make|configure" | sed 's;\./;;' | \
 while read f
 do
-       if [ ! -f $OFW/$f ]
-       then
-               echo $f
-       elif ! cmp $f $OFW/$f > /dev/null
+       if grep -q $f $FWINFO
        then
-               echo $f
+               if [ ! -f $OFW/$f ]
+               then
+                       echo $f
+               elif ! cmp $f $OFW/$f > /dev/null
+               then
+                       echo $f
+               fi
        fi
 done) |\
 while read f