Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r13382 - in main/trunk/bin/ebuild-helpers: . 3
Date: Tue, 21 Apr 2009 07:14:39
Message-Id: E1LwABY-0005y8-Uj@stork.gentoo.org
1 Author: zmedico
2 Date: 2009-04-21 07:14:28 +0000 (Tue, 21 Apr 2009)
3 New Revision: 13382
4
5 Added:
6 main/trunk/bin/ebuild-helpers/3/
7 main/trunk/bin/ebuild-helpers/3/dodoc
8 Log:
9 Add new dodoc implementation for EAPI 3. Thanks to to Tiziano M?\195?\188ller
10 <dev-zero@g.o> for this patch.
11
12
13 Added: main/trunk/bin/ebuild-helpers/3/dodoc
14 ===================================================================
15 --- main/trunk/bin/ebuild-helpers/3/dodoc (rev 0)
16 +++ main/trunk/bin/ebuild-helpers/3/dodoc 2009-04-21 07:14:28 UTC (rev 13382)
17 @@ -0,0 +1,50 @@
18 +#!/bin/bash
19 +# Copyright 1999-2009 Gentoo Foundation
20 +# Distributed under the terms of the GNU General Public License v2
21 +# $Id$
22 +
23 +source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
24 +
25 +if [ $# -lt 1 ] ; then
26 + vecho "${0##*/}: at least one argument needed" 1>&2
27 + exit 1
28 +fi
29 +
30 +dir="${D}usr/share/doc/${PF}/${_E_DOCDESTTREE_}"
31 +if [ ! -d "${dir}" ] ; then
32 + install -d "${dir}"
33 +fi
34 +
35 +ret=0
36 +
37 +DOINSRECUR="n"
38 +
39 +if [[ "$1" == "-r" ]] ; then
40 + DOINSRECUR="y"
41 + shift
42 +fi
43 +
44 +for x in "$@" ; do
45 +
46 + if [ -d "${x}" ] ; then
47 + if [[ ${DOINSRECUR} == "n" ]] ; then
48 + continue
49 + fi
50 +
51 + find "${x}" -mindepth 1 -maxdepth 1 -exec \
52 + env \
53 + _E_DOCDESTTREE_="$(basename "${x}")" \
54 + ${0} -r {} \;
55 +
56 + elif [ -s "${x}" ] ; then
57 + install -m0644 "${x}" "${dir}"
58 + ecompress --queue "${dir}/${x##*/}"
59 +
60 + elif [ ! -e "${x}" ] ; then
61 + echo "!!! ${0##*/}: $x does not exist" 1>&2
62 + ((++ret))
63 + fi
64 +
65 +done
66 +
67 +exit ${ret}
68
69
70 Property changes on: main/trunk/bin/ebuild-helpers/3/dodoc
71 ___________________________________________________________________
72 Name: svn:keywords
73 + Id