#
# shell snippet to set UPLOAD_TO

if test -z "$UPLOAD_TO" -a -f $HOME/.sourcemgr.cf ; then
	UPLOAD_TO=$(/usr/share/sourcemgr/getvar $HOME/.sourcemgr.cf UPLOAD_TO)
fi
if test -z "$UPLOAD_TO" ; then
	UPLOAD_TO=$(/usr/share/sourcemgr/getvar /etc/sourcemgr.cf UPLOAD_TO)
fi
if test -z "$UPLOAD_TO" ; then
	cat <<_END >&2
$0: Error: You need to set the UPLOAD_TO variable.
    Do this either as an environment variable,
        in ~/.sourcemgr.cf, or /etc/sourcemgr.cf
	Set it to "-" if you don't want to auto-upload.
_END
	exit 1
fi
if test "$UPLOAD_TO" = "-" ; then UPLOAD_TO=""; fi
