aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2012-08-31 15:10:16 (GMT)
committerUlrich Müller <ulm@gentoo.org>2012-08-31 15:20:16 (GMT)
commite7e4c3720582a7ab938266e50e53d162f5248488 (patch)
tree6eecbd06e29b7081a5a86a6fd40f5e33dc9380b9
parentUpdate years in header. (diff)
downloadportage-e7e4c3720582a7ab938266e50e53d162f5248488.zip
portage-e7e4c3720582a7ab938266e50e53d162f5248488.tar.gz
portage-e7e4c3720582a7ab938266e50e53d162f5248488.tar.bz2
EAPI 5: doheader and newheader helper functions
See bug #21310.
-rwxr-xr-xbin/ebuild-helpers/doheader21
l---------bin/ebuild-helpers/newheader1
2 files changed, 22 insertions, 0 deletions
diff --git a/bin/ebuild-helpers/doheader b/bin/ebuild-helpers/doheader
new file mode 100755
index 0000000..9bbe5bc
--- /dev/null
+++ b/bin/ebuild-helpers/doheader
@@ -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
index 0000000..59a0db2
--- /dev/null
+++ b/bin/ebuild-helpers/newheader
@@ -0,0 +1 @@
+newins \ No newline at end of file