Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 156833 Details for
Bug 227089
app-arch/lzma-utils-4.32.6: lzgrep is #!/bin/sh but needs bash
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
lzpipe-sh.patch
lzpipe-sh.patch (text/plain), 1.44 KB, created by
Peter Alfredsen (RETIRED)
on 2008-06-15 09:06:12 UTC
(
hide
)
Description:
lzpipe-sh.patch
Filename:
MIME Type:
Creator:
Peter Alfredsen (RETIRED)
Created:
2008-06-15 09:06:12 UTC
Size:
1.44 KB
patch
obsolete
>--- lzgrep.orig 2008-06-01 00:46:40.000000000 +0200 >+++ lzgrep 2008-06-15 10:50:08.000000000 +0200 >@@ -21,11 +21,14 @@ > # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA > # 02111-1307, USA. > > # Improve error handling, this is supported by bash but not all the other > # shells so we hide the possible error: >-set -o pipefail > /dev/null 2> /dev/null >+if [ -n $BASH_VERSION ] >+then >+ set -o pipefail &> /dev/null >+fi > > prog=`echo "$0" | sed 's|.*/||'` > case "$prog" in > *egrep) grep=${EGREP-egrep} ;; > *fgrep) grep=${FGREP-fgrep} ;; >@@ -91,23 +94,21 @@ > lzma -dc | $grep $opt "$pat" > exit $? > fi > > res=0 >-trap break SIGPIPE >+trap break PIPE > for i do > lzma -dc "$i" | > if test $files_with_matches -eq 1; then > $grep $opt "$pat" > /dev/null && printf "%s\n" "$i" > elif test $files_without_matches -eq 1; then > $grep $opt "$pat" > /dev/null || printf "%s\n" "$i" > elif test $with_filename -eq 0 && { test $# -eq 1 || test $no_filename -eq 1; }; then > $grep $opt "$pat" > else >- i=${i//\\/\\\\} >- i=${i//|/\\|} >- i=${i//&/\\&} >+ i=$(echo "$i" | sed -e 's,\\,\\\\,g' -e 's,|,\\|,g' -e 's,&,\\&,g') > i=`printf "%s" "$i" | tr '\n' ' '` > if test $with_filename -eq 1; then > sed_script="s|^[^:]*:|${i}:|" > else > sed_script="s|^|${i}:|" >@@ -117,7 +118,7 @@ > r=$? > test $res -lt $r && res=$r > # SIGPIPE + 128 > test "$r" -eq 141 && exit $res > done >-trap - SIGPIPE >+trap - PIPE > exit $res
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 Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 227089
: 156833