#!/bin/bash
# $Header: /var/cvsroot/gentoo-src/portage/bin/dolib,v 1.6 2004/08/16 08:19:38 carpaski Exp $

if [ -z "${CONF_LIBDIR}" ]; then
	# we need this to default to lib so that things dont break
	CONF_LIBDIR="lib"
fi

if [ ${#} -lt 1 ] ; then
	echo "${0}: at least one argument needed"
	exit 1
fi
if [ ! -d "${D}${DESTTREE}/${CONF_LIBDIR}" ] ; then
	install -d "${D}${DESTTREE}/${CONF_LIBDIR}"
fi

for x in "$@" ; do
	if [ -e "${x}" ] ; then
		install ${LIBOPTIONS} "${x}" "${D}${DESTTREE}/${CONF_LIBDIR}"
	else
		echo "${0}: ${x} does not exist"
	fi
done
