Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 96064 Details for
Bug 146387
NEW ECLASS: esed.eclass
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
esed.eclass
esed.eclass (text/plain), 1.19 KB, created by
kalium
on 2006-09-05 06:17:11 UTC
(
hide
)
Description:
esed.eclass
Filename:
MIME Type:
Creator:
kalium
Created:
2006-09-05 06:17:11 UTC
Size:
1.19 KB
patch
obsolete
># Copyright 1999-2006 Gentoo Foundation ># Distributed under the terms of the GNU General Public License v2 ># $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.33 2006/07/22 13:52:38 hattya Exp $ > >## --------------------------------------------------------------------------- # ># Author: Mark Stier ># ># sed wrapper with useful error return codes. ># ># Usage: mysed filename expr1 [expr2 ...] ># ># Returns 0 if all expressions have led to a replacement, 1 if one or more ># expressions did not lead to a match. ># >## --------------------------------------------------------------------------- # > >#EXPORT_FUNCTIONS esed > >HOMEPAGE="" >DESCRIPTION="" > >DEPEND=">=sys-apps/sed-4.1.4" > >esed() { > local file=$1 > einfo "esed working on $file:" > local arg > local ret=0 > local c=0 > shift > for arg in "$@"; do > let "c++" > local lret=0 > ebegin " applying expression \"$arg\"" > sed -i.sedbak "$file" -e "${arg}" > [[ $? -ne 0 ]] && lret=1 > cmp "$file" "$file.sedbak" >/dev/null 2>&1 && lret=1 > rm -f "$file.sedbak" > [[ $lret -ne 0 ]] && let "ret++" > eend $lret > done > if [[ $ret -eq 0 ]]; then > einfo "All expressions applied successfully." > else > eerror "$ret out of $c expressions failed." > fi > return $ret >} >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 146387
:
96064
|
96067