aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/irrlicht-1.8/source/Irrlicht/bzip2/bzgrep
diff options
context:
space:
mode:
authorDavid Walter Seikel2013-01-13 17:24:39 +1000
committerDavid Walter Seikel2013-01-13 17:24:39 +1000
commit393b5cd1dc438872af89d334ef6e5fcc59f27d47 (patch)
tree6a14521219942a08a1b95cb2f5a923a9edd60f63 /libraries/irrlicht-1.8/source/Irrlicht/bzip2/bzgrep
parentAdd a note about rasters suggested start up code. (diff)
downloadSledjHamr-393b5cd1dc438872af89d334ef6e5fcc59f27d47.zip
SledjHamr-393b5cd1dc438872af89d334ef6e5fcc59f27d47.tar.gz
SledjHamr-393b5cd1dc438872af89d334ef6e5fcc59f27d47.tar.bz2
SledjHamr-393b5cd1dc438872af89d334ef6e5fcc59f27d47.tar.xz
Added Irrlicht 1.8, but without all the Windows binaries.
Diffstat (limited to '')
-rw-r--r--libraries/irrlicht-1.8/source/Irrlicht/bzip2/bzgrep75
-rw-r--r--libraries/irrlicht-1.8/source/Irrlicht/bzip2/bzgrep.156
2 files changed, 131 insertions, 0 deletions
diff --git a/libraries/irrlicht-1.8/source/Irrlicht/bzip2/bzgrep b/libraries/irrlicht-1.8/source/Irrlicht/bzip2/bzgrep
new file mode 100644
index 0000000..9a04b83
--- /dev/null
+++ b/libraries/irrlicht-1.8/source/Irrlicht/bzip2/bzgrep
@@ -0,0 +1,75 @@
1#!/bin/sh
2
3# Bzgrep wrapped for bzip2,
4# adapted from zgrep by Philippe Troin <phil@fifi.org> for Debian GNU/Linux.
5## zgrep notice:
6## zgrep -- a wrapper around a grep program that decompresses files as needed
7## Adapted from a version sent by Charles Levert <charles@comm.polymtl.ca>
8
9PATH="/usr/bin:$PATH"; export PATH
10
11prog=`echo $0 | sed 's|.*/||'`
12case "$prog" in
13 *egrep) grep=${EGREP-egrep} ;;
14 *fgrep) grep=${FGREP-fgrep} ;;
15 *) grep=${GREP-grep} ;;
16esac
17pat=""
18while test $# -ne 0; do
19 case "$1" in
20 -e | -f) opt="$opt $1"; shift; pat="$1"
21 if test "$grep" = grep; then # grep is buggy with -e on SVR4
22 grep=egrep
23 fi;;
24 -A | -B) opt="$opt $1 $2"; shift;;
25 -*) opt="$opt $1";;
26 *) if test -z "$pat"; then
27 pat="$1"
28 else
29 break;
30 fi;;
31 esac
32 shift
33done
34
35if test -z "$pat"; then
36 echo "grep through bzip2 files"
37 echo "usage: $prog [grep_options] pattern [files]"
38 exit 1
39fi
40
41list=0
42silent=0
43op=`echo "$opt" | sed -e 's/ //g' -e 's/-//g'`
44case "$op" in
45 *l*) list=1
46esac
47case "$op" in
48 *h*) silent=1
49esac
50
51if test $# -eq 0; then
52 bzip2 -cdfq | $grep $opt "$pat"
53 exit $?
54fi
55
56res=0
57for i do
58 if test -f "$i"; then :; else if test -f "$i.bz2"; then i="$i.bz2"; fi; fi
59 if test $list -eq 1; then
60 bzip2 -cdfq "$i" | $grep $opt "$pat" 2>&1 > /dev/null && echo $i
61 r=$?
62 elif test $# -eq 1 -o $silent -eq 1; then
63 bzip2 -cdfq "$i" | $grep $opt "$pat"
64 r=$?
65 else
66 j=${i//\\/\\\\}
67 j=${j//|/\\|}
68 j=${j//&/\\&}
69 j=`printf "%s" "$j" | tr '\n' ' '`
70 bzip2 -cdfq "$i" | $grep $opt "$pat" | sed "s|^|${j}:|"
71 r=$?
72 fi
73 test "$r" -ne 0 && res="$r"
74done
75exit $res
diff --git a/libraries/irrlicht-1.8/source/Irrlicht/bzip2/bzgrep.1 b/libraries/irrlicht-1.8/source/Irrlicht/bzip2/bzgrep.1
new file mode 100644
index 0000000..930af8c
--- /dev/null
+++ b/libraries/irrlicht-1.8/source/Irrlicht/bzip2/bzgrep.1
@@ -0,0 +1,56 @@
1\"Shamelessly copied from zmore.1 by Philippe Troin <phil@fifi.org>
2\"for Debian GNU/Linux
3.TH BZGREP 1
4.SH NAME
5bzgrep, bzfgrep, bzegrep \- search possibly bzip2 compressed files for a regular expression
6.SH SYNOPSIS
7.B bzgrep
8[ grep_options ]
9.BI [\ -e\ ] " pattern"
10.IR filename ".\|.\|."
11.br
12.B bzegrep
13[ egrep_options ]
14.BI [\ -e\ ] " pattern"
15.IR filename ".\|.\|."
16.br
17.B bzfgrep
18[ fgrep_options ]
19.BI [\ -e\ ] " pattern"
20.IR filename ".\|.\|."
21.SH DESCRIPTION
22.IR Bzgrep
23is used to invoke the
24.I grep
25on bzip2-compressed files. All options specified are passed directly to
26.I grep.
27If no file is specified, then the standard input is decompressed
28if necessary and fed to grep.
29Otherwise the given files are uncompressed if necessary and fed to
30.I grep.
31.PP
32If
33.I bzgrep
34is invoked as
35.I bzegrep
36or
37.I bzfgrep
38then
39.I egrep
40or
41.I fgrep
42is used instead of
43.I grep.
44If the GREP environment variable is set,
45.I bzgrep
46uses it as the
47.I grep
48program to be invoked. For example:
49
50 for sh: GREP=fgrep bzgrep string files
51 for csh: (setenv GREP fgrep; bzgrep string files)
52.SH AUTHOR
53Charles Levert (charles@comm.polymtl.ca). Adapted to bzip2 by Philippe
54Troin <phil@fifi.org> for Debian GNU/Linux.
55.SH "SEE ALSO"
56grep(1), egrep(1), fgrep(1), bzdiff(1), bzmore(1), bzless(1), bzip2(1)