wok rev 13088

get-wifi-firmware: remove hard coded version for b43 & zd1211
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Jun 25 19:24:18 2012 +0200 (2012-06-25)
parents dbd759dcccf3
children e5684259842d
files get-wifi-firmware/stuff/get-wifi-firmware
line diff
     1.1 --- a/get-wifi-firmware/stuff/get-wifi-firmware	Mon Jun 25 18:44:53 2012 +0200
     1.2 +++ b/get-wifi-firmware/stuff/get-wifi-firmware	Mon Jun 25 19:24:18 2012 +0200
     1.3 @@ -7,18 +7,22 @@
     1.4  DEPENDS=""
     1.5  case "$MODULE" in
     1.6  b43)
     1.7 -	VERSION=4.150.10.5
     1.8 +	WEB_SITE="http://www.linuxwireless.org/en/users/Drivers/b43"
     1.9 +	WGET_URL="http://mirror2.openwrt.org/sources"
    1.10 +	VERSION=$(wget -O - $WGET_URL | sed \
    1.11 +	  '/broadcom-wl-[0-9\.]*.tar/!d;s/.*com-wl-\([0-9\.]*\).tar.*/\1/' | \
    1.12 +	  tail -n 1)
    1.13  	SUBDIR="broadcom-wl-$VERSION"
    1.14  	SHORT_DESC="Broadcom $MODULE firmware."
    1.15 -	WEB_SITE="http://www.linuxwireless.org/en/users/Drivers/b43"
    1.16 -	WGET_URL="http://mirror2.openwrt.org/sources/$SUBDIR.tar.bz2"
    1.17 +	WGET_URL="$WGET_URL/$SUBDIR.tar.bz2"
    1.18  	DEPENDS="b43-fwcutter"
    1.19  	FWSET=wl_apsta_mimo.o
    1.20  	;;
    1.21  b43legacy)
    1.22 -	VERSION=3.130.20.0
    1.23 +	WEB_SITE="http://downloads.openwrt.org/"
    1.24 +	VERSION=$(wget -O - ${WEB_SITE}sources | sed \
    1.25 +	  '/wl_apsta/!d;s/.*>wl_apsta-\(.*\).o.*/\1/')
    1.26  	SHORT_DESC="Broadcom $MODULE firmware (BCM4306 rev2 or 802.11b chips)."
    1.27 -	WEB_SITE="http://downloads.openwrt.org/"
    1.28  	WGET_URL="${WEB_SITE}sources/wl_apsta-$VERSION.o"
    1.29  	DEPENDS="b43-fwcutter"
    1.30  	FWSET=wl_apsta-$VERSION.o
    1.31 @@ -90,10 +94,12 @@
    1.32  	WGET_URL="ftp://ftp.archlinux.org/other/${MODULE}-fw/RT2870_Firmware_V${VERSION}.zip"
    1.33  	;;
    1.34  zd1211|zd1211rw)
    1.35 -	VERSION=2.21.0.0-1
    1.36 +	WGET_URL="http://mirrors.kernel.org/debian/pool/non-free/z/zd1211-firmware"
    1.37 +	VERSION=$(wget -O - $WGET_URL | sed -e '/zd1211-firmware/!d' \
    1.38 +	  -e '/all.deb/!d' -e 's/.*>zd1211-firmware_\(.*\)_all.deb.*/\1/')
    1.39  	SHORT_DESC="zd1211/zd1211rw Wireless Lan firmware."
    1.40  	WEB_SITE="http://packages.debian.org/etch/zd1211-firmware"
    1.41 -	WGET_URL="http://mirrors.kernel.org/debian/pool/non-free/z/zd1211-firmware/zd1211-firmware_${VERSION}_all.deb"
    1.42 +	WGET_URL="$WGET_URL/zd1211-firmware_${VERSION}_all.deb"
    1.43  	;;
    1.44  *)	echo "Unknown wifi driver. Please run one of the following commands:"
    1.45  	for i in $(cd $(dirname $0); ls get-*-firmware); do