#!/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
# one or two arguments.  The first argument is the name of the file in
# question and the second, if present, is the version label.  The
# script writes to standard output the flag needed by ``co'' to get
# the revision of the file corresponding to the given version of the
# current package.  If the version is not given, nothing is written to
# standard output.

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

if (test ${2}"" = "") ; then
    exit 0
fi

version_label=`ver_sub_ver ${1} ${2}`
if (test ${?} != 0) ; then
    exit 1
fi

echo "-r"${version_label}
exit 0
