summaryrefslogtreecommitdiffstats
path: root/bin/ebuild-helpers/doinfo
blob: 2edbdc592e14db9f97468d12573cb2b541935153 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh

if [[ -z $1 ]] ; then
	__helpers_die "${0##*/}: at least one argument needed"
	exit 1
fi

if ! ___eapi_has_prefix_variables; then
	ED=${D}
fi

if [[ ! -d ${ED}usr/share/info ]] ; then
	install -d "${ED}usr/share/info" || { __helpers_die "${0##*/}: failed to install ${ED}usr/share/info"; exit 1; }
fi

install -m0644 "$@" "${ED}usr/share/info"
rval=$?
if [ $rval -ne 0 ] ; then
	for x in "$@" ; do
		[ -e "$x" ] || echo "!!! ${0##*/}: $x does not exist" 1>&2
	done
	__helpers_die "${0##*/} failed"
fi
exit $rval