FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo Development

 
 
LinkBack Thread Tools
 
Old 08-16-2012, 08:19 PM
Michał Górny
 
Default Add dointo && newinto.

---
eutils.eclass | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)

diff --git a/eutils.eclass b/eutils.eclass
index eb8c8f7..119fc32 100644
--- a/eutils.eclass
+++ b/eutils.eclass
@@ -650,6 +650,43 @@ edos2unix() {
sed -i 's/
$//' -- "$@" || die
}

+# @FUNCTION: dointo
+# @USAGE: <directory> <file> [...]
+# @DESCRIPTION:
+# Install all specified <file>s into <directory>. This doesn't modify global
+# 'insinto' path. Alike doins, calls 'die' on failure in EAPI 4+; in earlier
+# EAPIs, returns false in that case.
+dointo() {
+ [[ ${#} -gt 2 ]] || die 'Synopsis: dointo <directory> <file> [...]'
+
+ local directory=${1}
+ shift
+
+ (
+ insinto "${directory}"
+ doins "${@}"
+ )
+}
+
+# @FUNCTION: newinto
+# @USAGE: <directory> <file> <new-name>
+# @DESCRIPTION:
+# Install the specified <file> into <directory>, renaming it to <new-name>.
+# This doesn't modify global 'insinto' path. Alike doins, calls 'die' on failure
+# in EAPI 4+; in earlier EAPIs, returns false in that case.
+newinto() {
+ [[ ${#} -eq 3 ]] || die 'Synopsis: newinto <directory> <file> <new-name>'
+
+ local directory=${1}
+ local f=${2}
+ local new_name=${3}
+
+ (
+ insinto "${directory}"
+ newins "${f}" "${new_name}"
+ )
+}
+
# @FUNCTION: make_desktop_entry
# @USAGE: make_desktop_entry(<command>, [name], [icon], [type], [fields])
# @DESCRIPTION:
--
1.7.11.1
 

Thread Tools




All times are GMT. The time now is 11:33 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org