1#!/bin/sh 2# $FreeBSD: releng/10.2/sys/modules/drm2/radeonkmsfw/gen-makefiles 254885 2013-08-25 19:37:15Z dumbbell $ 3 4set -e 5 6scriptdir=$(cd $(dirname $0) && pwd) 7fwdir=$scriptdir/../../../contrib/dev/drm2/radeonkmsfw 8 9for dir in $scriptdir/*; do 10 if [ ! -d $dir ]; then 11 continue 12 fi 13 rm -rf $dir 14done 15 16for file in $fwdir/*.uu; do 17 img=$(basename $file) 18 img=${img%.bin.uu} 19 echo "Image: $img" 20 21 mkdir -p $scriptdir/$img 22 cat > $scriptdir/$img/Makefile <<EOF 23# \$FreeBSD: releng/10.2/sys/modules/drm2/radeonkmsfw/gen-makefiles 254885 2013-08-25 19:37:15Z dumbbell $ 24 25KMOD= radeonkmsfw_$img 26IMG= $img 27 28.include <bsd.kmod.mk> 29EOF 30done 31