#!/bin/sh
for file in debian/build/platforms.* ; do
    subarch=$(echo ${file} | sed -e 's,.*platforms.,,g')
    case "${subarch}" in
	-) package=u-boot ;;
	*) package=u-boot-${subarch} ;;
    esac
    echo $(LC_ALL=C sort -u ${file}) | \
	sed -e 's, ,${Newline},g' \
	-e 's,^,uboot:platforms=${Newline}Included platforms:${Newline},g' \
	>> debian/${package}.substvars
done
