diff options
author | Mike Frysinger <vapier@gentoo.org> | 2011-10-09 19:19:07 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2011-10-09 19:19:07 +0000 |
commit | 766835177c3b4c1f6cd7ed3161d639ffef6eb293 (patch) | |
tree | dcc8f192abbd35cbf74bad8f06ccccec61a5fe9c /sys-apps/less | |
parent | ppc/ppc64 stable wrt #385953 (diff) | |
download | gentoo-2-766835177c3b4c1f6cd7ed3161d639ffef6eb293.tar.gz gentoo-2-766835177c3b4c1f6cd7ed3161d639ffef6eb293.tar.bz2 gentoo-2-766835177c3b4c1f6cd7ed3161d639ffef6eb293.zip |
Only run cd-info when the .cue file exists #285507 by Martin von Gagern.
(Portage version: 2.2.0_alpha59/cvs/Linux x86_64)
Diffstat (limited to 'sys-apps/less')
-rw-r--r-- | sys-apps/less/ChangeLog | 5 | ||||
-rw-r--r-- | sys-apps/less/files/lesspipe.sh | 10 |
2 files changed, 11 insertions, 4 deletions
diff --git a/sys-apps/less/ChangeLog b/sys-apps/less/ChangeLog index 47340a27aebb..fb0efbc2fbd9 100644 --- a/sys-apps/less/ChangeLog +++ b/sys-apps/less/ChangeLog @@ -1,6 +1,9 @@ # ChangeLog for sys-apps/less # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/less/ChangeLog,v 1.129 2011/06/09 18:37:30 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/less/ChangeLog,v 1.130 2011/10/09 19:19:07 vapier Exp $ + + 09 Oct 2011; Mike Frysinger <vapier@gentoo.org> files/lesspipe.sh: + Only run cd-info when the .cue file exists #285507 by Martin von Gagern. *less-444 (09 Jun 2011) diff --git a/sys-apps/less/files/lesspipe.sh b/sys-apps/less/files/lesspipe.sh index b656e3067f2e..4fc04acec660 100644 --- a/sys-apps/less/files/lesspipe.sh +++ b/sys-apps/less/files/lesspipe.sh @@ -160,8 +160,12 @@ lesspipe() { *.flac) metaflac --list "$1" ;; *.torrent) torrentinfo "$1" || torrentinfo-console "$1" || ctorrent -x "$1" ;; *.bin|*.cue|*.raw) - # not all .bin/.raw files are cd images, so fall back to hexdump - cd-info --no-header --no-device-info "$1" || lesspipe_file "$1" + # not all .bin/.raw files are cd images #285507 + # fall back to lesspipe_file if .cue doesn't exist, or if + # cd-info failed to parse things sanely + [[ -e ${1%.*}.cue ]] \ + && cd-info --no-header --no-device-info "$1" \ + || lesspipe_file "$1" ;; *.iso) iso_info=$(isoinfo -d -i "$1") @@ -229,7 +233,7 @@ if [[ -z $1 ]] ; then elif [[ $1 == "-V" || $1 == "--version" ]] ; then Id="cvsid" cat <<-EOF - $Id: lesspipe.sh,v 1.45 2011/01/20 03:26:14 vapier Exp $ + $Id: lesspipe.sh,v 1.46 2011/10/09 19:19:07 vapier Exp $ Copyright 2001-2010 Gentoo Foundation Mike Frysinger <vapier@gentoo.org> (with plenty of ideas stolen from other projects/distros) |