EAPI 5: doheader and newheader helper functions
authorUlrich Müller <ulm@gentoo.org>
Fri, 31 Aug 2012 15:10:16 +0000 (17:10 +0200)
committerUlrich Müller <ulm@gentoo.org>
Fri, 31 Aug 2012 15:20:16 +0000 (17:20 +0200)
See bug #21310.

bin/ebuild-helpers/doheader [new file with mode: 0755]
bin/ebuild-helpers/newheader [new symlink]

diff --git a/bin/ebuild-helpers/doheader b/bin/ebuild-helpers/doheader
new file mode 100755 (executable)
index 0000000..9bbe5bc
--- /dev/null
@@ -0,0 +1,21 @@
+#!/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
+
+case ${EAPI} in
+       0|1|2|3|4|4-python|4-slot-abi)
+               die "${0##*/} is not supported in EAPI ${EAPI}"
+               ;;
+esac
+
+if [[ $# -lt 1 ]] ; then
+       helpers_die "${0##*/}: at least one argument needed"
+       exit 1
+fi
+
+exec \
+env \
+INSDESTTREE="/usr/include/" \
+doins "$@"
diff --git a/bin/ebuild-helpers/newheader b/bin/ebuild-helpers/newheader
new file mode 120000 (symlink)
index 0000000..59a0db2
--- /dev/null
@@ -0,0 +1 @@
+newins
\ No newline at end of file