eclass/coreos-doc: add helper for including docs

This commit is contained in:
Alex Crawford 2015-01-15 15:24:41 -08:00
parent e3cf1b0153
commit c8cd2621cc

View File

@ -0,0 +1,23 @@
# Copyright 2015 CoreOS, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: $
# @ECLASS: coreos-doc.eclass
# @BLURB: utility function for including documentation
# @FUNCTION: coreos-dodoc
# @USAGE: [-r] <list of docs>
coreos-dodoc() {
debug-print-function ${FUNCNAME} "${@}"
local flags
if [[ "${1}" == "-r" ]] ; then
flags="-r"
shift
fi
[[ "${#}" -lt 1 ]] && die "${0}: at least one file needed"
insinto "/usr/share/coreos/doc/${P}/"
doins $flags $@
}