#!/bin/sh
#
# This file should only be run automatically by make, not directly by
# the user.
#
# This script is part of the SUIF version control system.  It takes
# two arguments.  The first argument is the name of the sub-package in
# question and the second is the version label.  The script writes to
# standard output the version of that sub-package to use for the given
# version of the current package.

if (test ${1}"" = "") ; then
    echo "no sub-package name given" 1>&2
    exit 1
fi

if (test ${1}"" = "") ; then
    echo "no version label given" 1>&2
    exit 1
fi

echo `ver_list_sources_for_version ${2} | awk '{if ($2 == "'${1}'") print $1}'`
exit ${?}
