#!/bin/bash

if [ -z "$1" ]; then
cat << EOT
Backports and build a source package for all currently supported NeuroDebian
releases.

Synopsis
--------

  nd_build4allnd <dsc file>
EOT
exit 1
fi

dscfile=$1; shift

. /etc/neurodebian/cmdsettings.sh

for d in $allnddists; do
  dfamily=${d%%-*}
  drelease=${d##*-}

  bpdsc=$(nd_backport $drelease $dscfile | tail -n1 | sed -e 's/^.* //g')
  nd_build $dfamily $drelease $bpdsc "$@" || :
done
