michaelu0826 commited on
Commit
337b29c
·
verified ·
1 Parent(s): 353310d

Add files using upload-large-folder tool

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
bin/2to3 ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ #!/usr/local/miniconda3/envs/phantom/bin/python3.11
2
+ import sys
3
+ from lib2to3.main import main
4
+
5
+ sys.exit(main("lib2to3.fixes"))
bin/2to3-3.11 ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ #!/usr/local/miniconda3/envs/phantom/bin/python3.11
2
+ import sys
3
+ from lib2to3.main import main
4
+
5
+ sys.exit(main("lib2to3.fixes"))
bin/accelerate ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ #!/usr/local/miniconda3/envs/phantom/bin/python3.11
2
+ import sys
3
+ from accelerate.commands.accelerate_cli import main
4
+ if __name__ == '__main__':
5
+ sys.argv[0] = sys.argv[0].removesuffix('.exe')
6
+ sys.exit(main())
bin/accelerate-config ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ #!/usr/local/miniconda3/envs/phantom/bin/python3.11
2
+ import sys
3
+ from accelerate.commands.config import main
4
+ if __name__ == '__main__':
5
+ sys.argv[0] = sys.argv[0].removesuffix('.exe')
6
+ sys.exit(main())
bin/accelerate-estimate-memory ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ #!/usr/local/miniconda3/envs/phantom/bin/python3.11
2
+ import sys
3
+ from accelerate.commands.estimate import main
4
+ if __name__ == '__main__':
5
+ sys.argv[0] = sys.argv[0].removesuffix('.exe')
6
+ sys.exit(main())
bin/bzcmp ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/sh
2
+ # sh is buggy on RS/6000 AIX 3.2. Replace above line with #!/bin/ksh
3
+
4
+ # Bzcmp/diff wrapped for bzip2,
5
+ # adapted from zdiff by Philippe Troin <phil@fifi.org> for Debian GNU/Linux.
6
+
7
+ # Bzcmp and bzdiff are used to invoke the cmp or the diff pro-
8
+ # gram on compressed files. All options specified are passed
9
+ # directly to cmp or diff. If only 1 file is specified, then
10
+ # the files compared are file1 and an uncompressed file1.gz.
11
+ # If two files are specified, then they are uncompressed (if
12
+ # necessary) and fed to cmp or diff. The exit status from cmp
13
+ # or diff is preserved.
14
+
15
+ PATH="/usr/bin:/bin:$PATH"; export PATH
16
+ prog=`echo $0 | sed 's|.*/||'`
17
+ case "$prog" in
18
+ *cmp) comp=${CMP-cmp} ;;
19
+ *) comp=${DIFF-diff} ;;
20
+ esac
21
+
22
+ OPTIONS=
23
+ FILES=
24
+ for ARG
25
+ do
26
+ case "$ARG" in
27
+ -*) OPTIONS="$OPTIONS $ARG";;
28
+ *) if test -f "$ARG"; then
29
+ FILES="$FILES $ARG"
30
+ else
31
+ echo "${prog}: $ARG not found or not a regular file"
32
+ exit 1
33
+ fi ;;
34
+ esac
35
+ done
36
+ if test -z "$FILES"; then
37
+ echo "Usage: $prog [${comp}_options] file [file]"
38
+ exit 1
39
+ fi
40
+ set $FILES
41
+ if test $# -eq 1; then
42
+ FILE=`echo "$1" | sed 's/.bz2$//'`
43
+ bzip2 -cd "$FILE.bz2" | $comp $OPTIONS - "$FILE"
44
+ STAT="$?"
45
+
46
+ elif test $# -eq 2; then
47
+ case "$1" in
48
+ *.bz2)
49
+ case "$2" in
50
+ *.bz2)
51
+ F=`echo "$2" | sed 's|.*/||;s|.bz2$||'`
52
+ tmp=`mktemp "${TMPDIR:-/tmp}"/bzdiff.XXXXXXXXXX` || {
53
+ echo 'cannot create a temporary file' >&2
54
+ exit 1
55
+ }
56
+ bzip2 -cdfq "$2" > "$tmp"
57
+ bzip2 -cdfq "$1" | $comp $OPTIONS - "$tmp"
58
+ STAT="$?"
59
+ /bin/rm -f "$tmp";;
60
+
61
+ *) bzip2 -cdfq "$1" | $comp $OPTIONS - "$2"
62
+ STAT="$?";;
63
+ esac;;
64
+ *) case "$2" in
65
+ *.bz2)
66
+ bzip2 -cdfq "$2" | $comp $OPTIONS "$1" -
67
+ STAT="$?";;
68
+ *) $comp $OPTIONS "$1" "$2"
69
+ STAT="$?";;
70
+ esac;;
71
+ esac
72
+ else
73
+ echo "Usage: $prog [${comp}_options] file [file]"
74
+ exit 1
75
+ fi
76
+ exit "$STAT"
bin/bzdiff ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/sh
2
+ # sh is buggy on RS/6000 AIX 3.2. Replace above line with #!/bin/ksh
3
+
4
+ # Bzcmp/diff wrapped for bzip2,
5
+ # adapted from zdiff by Philippe Troin <phil@fifi.org> for Debian GNU/Linux.
6
+
7
+ # Bzcmp and bzdiff are used to invoke the cmp or the diff pro-
8
+ # gram on compressed files. All options specified are passed
9
+ # directly to cmp or diff. If only 1 file is specified, then
10
+ # the files compared are file1 and an uncompressed file1.gz.
11
+ # If two files are specified, then they are uncompressed (if
12
+ # necessary) and fed to cmp or diff. The exit status from cmp
13
+ # or diff is preserved.
14
+
15
+ PATH="/usr/bin:/bin:$PATH"; export PATH
16
+ prog=`echo $0 | sed 's|.*/||'`
17
+ case "$prog" in
18
+ *cmp) comp=${CMP-cmp} ;;
19
+ *) comp=${DIFF-diff} ;;
20
+ esac
21
+
22
+ OPTIONS=
23
+ FILES=
24
+ for ARG
25
+ do
26
+ case "$ARG" in
27
+ -*) OPTIONS="$OPTIONS $ARG";;
28
+ *) if test -f "$ARG"; then
29
+ FILES="$FILES $ARG"
30
+ else
31
+ echo "${prog}: $ARG not found or not a regular file"
32
+ exit 1
33
+ fi ;;
34
+ esac
35
+ done
36
+ if test -z "$FILES"; then
37
+ echo "Usage: $prog [${comp}_options] file [file]"
38
+ exit 1
39
+ fi
40
+ set $FILES
41
+ if test $# -eq 1; then
42
+ FILE=`echo "$1" | sed 's/.bz2$//'`
43
+ bzip2 -cd "$FILE.bz2" | $comp $OPTIONS - "$FILE"
44
+ STAT="$?"
45
+
46
+ elif test $# -eq 2; then
47
+ case "$1" in
48
+ *.bz2)
49
+ case "$2" in
50
+ *.bz2)
51
+ F=`echo "$2" | sed 's|.*/||;s|.bz2$||'`
52
+ tmp=`mktemp "${TMPDIR:-/tmp}"/bzdiff.XXXXXXXXXX` || {
53
+ echo 'cannot create a temporary file' >&2
54
+ exit 1
55
+ }
56
+ bzip2 -cdfq "$2" > "$tmp"
57
+ bzip2 -cdfq "$1" | $comp $OPTIONS - "$tmp"
58
+ STAT="$?"
59
+ /bin/rm -f "$tmp";;
60
+
61
+ *) bzip2 -cdfq "$1" | $comp $OPTIONS - "$2"
62
+ STAT="$?";;
63
+ esac;;
64
+ *) case "$2" in
65
+ *.bz2)
66
+ bzip2 -cdfq "$2" | $comp $OPTIONS "$1" -
67
+ STAT="$?";;
68
+ *) $comp $OPTIONS "$1" "$2"
69
+ STAT="$?";;
70
+ esac;;
71
+ esac
72
+ else
73
+ echo "Usage: $prog [${comp}_options] file [file]"
74
+ exit 1
75
+ fi
76
+ exit "$STAT"
bin/bzegrep ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+
9
+ PATH="/usr/bin:$PATH"; export PATH
10
+
11
+ prog=`echo $0 | sed 's|.*/||'`
12
+ case "$prog" in
13
+ *egrep) grep=${EGREP-egrep} ;;
14
+ *fgrep) grep=${FGREP-fgrep} ;;
15
+ *) grep=${GREP-grep} ;;
16
+ esac
17
+ pat=""
18
+ while 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
33
+ done
34
+
35
+ if test -z "$pat"; then
36
+ echo "grep through bzip2 files"
37
+ echo "usage: $prog [grep_options] pattern [files]"
38
+ exit 1
39
+ fi
40
+
41
+ list=0
42
+ silent=0
43
+ op=`echo "$opt" | sed -e 's/ //g' -e 's/-//g'`
44
+ case "$op" in
45
+ *l*) list=1
46
+ esac
47
+ case "$op" in
48
+ *h*) silent=1
49
+ esac
50
+
51
+ if test $# -eq 0; then
52
+ bzip2 -cdfq | $grep $opt "$pat"
53
+ exit $?
54
+ fi
55
+
56
+ res=0
57
+ for 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=$(echo "$i" | sed 's/\\/&&/g;s/|/\\&/g;s/&/\\&/g')
67
+ j=`printf "%s" "$j" | tr '\n' ' '`
68
+ # A trick adapted from
69
+ # https://groups.google.com/forum/#!original/comp.unix.shell/x1345iu10eg/Nn1n-1r1uU0J
70
+ # that has the same effect as the following bash code:
71
+ # bzip2 -cdfq "$i" | $grep $opt "$pat" | sed "s|^|${j}:|"
72
+ # r=${PIPESTATUS[1]}
73
+ exec 3>&1
74
+ eval `
75
+ exec 4>&1 >&3 3>&-
76
+ {
77
+ bzip2 -cdfq "$i" 4>&-
78
+ } | {
79
+ $grep $opt "$pat" 4>&-; echo "r=$?;" >&4
80
+ } | sed "s|^|${j}:|"
81
+ `
82
+ fi
83
+ test "$r" -ne 0 && res="$r"
84
+ done
85
+ exit $res
bin/bzfgrep ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+
9
+ PATH="/usr/bin:$PATH"; export PATH
10
+
11
+ prog=`echo $0 | sed 's|.*/||'`
12
+ case "$prog" in
13
+ *egrep) grep=${EGREP-egrep} ;;
14
+ *fgrep) grep=${FGREP-fgrep} ;;
15
+ *) grep=${GREP-grep} ;;
16
+ esac
17
+ pat=""
18
+ while 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
33
+ done
34
+
35
+ if test -z "$pat"; then
36
+ echo "grep through bzip2 files"
37
+ echo "usage: $prog [grep_options] pattern [files]"
38
+ exit 1
39
+ fi
40
+
41
+ list=0
42
+ silent=0
43
+ op=`echo "$opt" | sed -e 's/ //g' -e 's/-//g'`
44
+ case "$op" in
45
+ *l*) list=1
46
+ esac
47
+ case "$op" in
48
+ *h*) silent=1
49
+ esac
50
+
51
+ if test $# -eq 0; then
52
+ bzip2 -cdfq | $grep $opt "$pat"
53
+ exit $?
54
+ fi
55
+
56
+ res=0
57
+ for 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=$(echo "$i" | sed 's/\\/&&/g;s/|/\\&/g;s/&/\\&/g')
67
+ j=`printf "%s" "$j" | tr '\n' ' '`
68
+ # A trick adapted from
69
+ # https://groups.google.com/forum/#!original/comp.unix.shell/x1345iu10eg/Nn1n-1r1uU0J
70
+ # that has the same effect as the following bash code:
71
+ # bzip2 -cdfq "$i" | $grep $opt "$pat" | sed "s|^|${j}:|"
72
+ # r=${PIPESTATUS[1]}
73
+ exec 3>&1
74
+ eval `
75
+ exec 4>&1 >&3 3>&-
76
+ {
77
+ bzip2 -cdfq "$i" 4>&-
78
+ } | {
79
+ $grep $opt "$pat" 4>&-; echo "r=$?;" >&4
80
+ } | sed "s|^|${j}:|"
81
+ `
82
+ fi
83
+ test "$r" -ne 0 && res="$r"
84
+ done
85
+ exit $res
bin/bzgrep ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+
9
+ PATH="/usr/bin:$PATH"; export PATH
10
+
11
+ prog=`echo $0 | sed 's|.*/||'`
12
+ case "$prog" in
13
+ *egrep) grep=${EGREP-egrep} ;;
14
+ *fgrep) grep=${FGREP-fgrep} ;;
15
+ *) grep=${GREP-grep} ;;
16
+ esac
17
+ pat=""
18
+ while 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
33
+ done
34
+
35
+ if test -z "$pat"; then
36
+ echo "grep through bzip2 files"
37
+ echo "usage: $prog [grep_options] pattern [files]"
38
+ exit 1
39
+ fi
40
+
41
+ list=0
42
+ silent=0
43
+ op=`echo "$opt" | sed -e 's/ //g' -e 's/-//g'`
44
+ case "$op" in
45
+ *l*) list=1
46
+ esac
47
+ case "$op" in
48
+ *h*) silent=1
49
+ esac
50
+
51
+ if test $# -eq 0; then
52
+ bzip2 -cdfq | $grep $opt "$pat"
53
+ exit $?
54
+ fi
55
+
56
+ res=0
57
+ for 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=$(echo "$i" | sed 's/\\/&&/g;s/|/\\&/g;s/&/\\&/g')
67
+ j=`printf "%s" "$j" | tr '\n' ' '`
68
+ # A trick adapted from
69
+ # https://groups.google.com/forum/#!original/comp.unix.shell/x1345iu10eg/Nn1n-1r1uU0J
70
+ # that has the same effect as the following bash code:
71
+ # bzip2 -cdfq "$i" | $grep $opt "$pat" | sed "s|^|${j}:|"
72
+ # r=${PIPESTATUS[1]}
73
+ exec 3>&1
74
+ eval `
75
+ exec 4>&1 >&3 3>&-
76
+ {
77
+ bzip2 -cdfq "$i" 4>&-
78
+ } | {
79
+ $grep $opt "$pat" 4>&-; echo "r=$?;" >&4
80
+ } | sed "s|^|${j}:|"
81
+ `
82
+ fi
83
+ test "$r" -ne 0 && res="$r"
84
+ done
85
+ exit $res
bin/bzip2recover ADDED
Binary file (30.9 kB). View file
 
bin/bzless ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/sh
2
+
3
+ # Bzmore wrapped for bzip2,
4
+ # adapted from zmore by Philippe Troin <phil@fifi.org> for Debian GNU/Linux.
5
+
6
+ PATH="/usr/bin:$PATH"; export PATH
7
+
8
+ prog=`echo $0 | sed 's|.*/||'`
9
+ case "$prog" in
10
+ *less) more=less ;;
11
+ *) more=more ;;
12
+ esac
13
+
14
+ if test "`echo -n a`" = "-n a"; then
15
+ # looks like a SysV system:
16
+ n1=''; n2='\c'
17
+ else
18
+ n1='-n'; n2=''
19
+ fi
20
+ oldtty=`stty -g 2>/dev/null`
21
+ if stty -cbreak 2>/dev/null; then
22
+ cb='cbreak'; ncb='-cbreak'
23
+ else
24
+ # 'stty min 1' resets eof to ^a on both SunOS and SysV!
25
+ cb='min 1 -icanon'; ncb='icanon eof ^d'
26
+ fi
27
+ if test $? -eq 0 -a -n "$oldtty"; then
28
+ trap 'stty $oldtty 2>/dev/null; exit' 0 2 3 5 10 13 15
29
+ else
30
+ trap 'stty $ncb echo 2>/dev/null; exit' 0 2 3 5 10 13 15
31
+ fi
32
+
33
+ if test $# = 0; then
34
+ if test -t 0; then
35
+ echo usage: $prog files...
36
+ else
37
+ bzip2 -cdfq | eval $more
38
+ fi
39
+ else
40
+ FIRST=1
41
+ for FILE
42
+ do
43
+ if test $FIRST -eq 0; then
44
+ echo $n1 "--More--(Next file: $FILE)$n2"
45
+ stty $cb -echo 2>/dev/null
46
+ ANS=`dd bs=1 count=1 2>/dev/null`
47
+ stty $ncb echo 2>/dev/null
48
+ echo " "
49
+ if test "$ANS" = 'e' -o "$ANS" = 'q'; then
50
+ exit
51
+ fi
52
+ fi
53
+ if test "$ANS" != 's'; then
54
+ echo "------> $FILE <------"
55
+ bzip2 -cdfq "$FILE" | eval $more
56
+ fi
57
+ if test -t; then
58
+ FIRST=0
59
+ fi
60
+ done
61
+ fi
bin/bzmore ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/sh
2
+
3
+ # Bzmore wrapped for bzip2,
4
+ # adapted from zmore by Philippe Troin <phil@fifi.org> for Debian GNU/Linux.
5
+
6
+ PATH="/usr/bin:$PATH"; export PATH
7
+
8
+ prog=`echo $0 | sed 's|.*/||'`
9
+ case "$prog" in
10
+ *less) more=less ;;
11
+ *) more=more ;;
12
+ esac
13
+
14
+ if test "`echo -n a`" = "-n a"; then
15
+ # looks like a SysV system:
16
+ n1=''; n2='\c'
17
+ else
18
+ n1='-n'; n2=''
19
+ fi
20
+ oldtty=`stty -g 2>/dev/null`
21
+ if stty -cbreak 2>/dev/null; then
22
+ cb='cbreak'; ncb='-cbreak'
23
+ else
24
+ # 'stty min 1' resets eof to ^a on both SunOS and SysV!
25
+ cb='min 1 -icanon'; ncb='icanon eof ^d'
26
+ fi
27
+ if test $? -eq 0 -a -n "$oldtty"; then
28
+ trap 'stty $oldtty 2>/dev/null; exit' 0 2 3 5 10 13 15
29
+ else
30
+ trap 'stty $ncb echo 2>/dev/null; exit' 0 2 3 5 10 13 15
31
+ fi
32
+
33
+ if test $# = 0; then
34
+ if test -t 0; then
35
+ echo usage: $prog files...
36
+ else
37
+ bzip2 -cdfq | eval $more
38
+ fi
39
+ else
40
+ FIRST=1
41
+ for FILE
42
+ do
43
+ if test $FIRST -eq 0; then
44
+ echo $n1 "--More--(Next file: $FILE)$n2"
45
+ stty $cb -echo 2>/dev/null
46
+ ANS=`dd bs=1 count=1 2>/dev/null`
47
+ stty $ncb echo 2>/dev/null
48
+ echo " "
49
+ if test "$ANS" = 'e' -o "$ANS" = 'q'; then
50
+ exit
51
+ fi
52
+ fi
53
+ if test "$ANS" != 's'; then
54
+ echo "------> $FILE <------"
55
+ bzip2 -cdfq "$FILE" | eval $more
56
+ fi
57
+ if test -t; then
58
+ FIRST=0
59
+ fi
60
+ done
61
+ fi
bin/c_rehash ADDED
@@ -0,0 +1,253 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/home/task_177574831708490/croot/openssl_1775748759570/_build_env/bin/perl
2
+
3
+ # WARNING: do not edit!
4
+ # Generated by Makefile from tools/c_rehash.in
5
+ # Copyright 1999-2025 The OpenSSL Project Authors. All Rights Reserved.
6
+ #
7
+ # Licensed under the Apache License 2.0 (the "License"). You may not use
8
+ # this file except in compliance with the License. You can obtain a copy
9
+ # in the file LICENSE in the source distribution or at
10
+ # https://www.openssl.org/source/license.html
11
+
12
+ # Perl c_rehash script, scan all files in a directory
13
+ # and add symbolic links to their hash values.
14
+
15
+ my $dir = "";
16
+ my $prefix = "/usr/local/miniconda3/envs/phantom";
17
+
18
+ my $errorcount = 0;
19
+ my $openssl = $ENV{OPENSSL} || "openssl";
20
+ my $pwd;
21
+ my $x509hash = "-subject_hash";
22
+ my $crlhash = "-hash";
23
+ my $verbose = 0;
24
+ my $symlink_exists=eval {symlink("",""); 1};
25
+ my $removelinks = 1;
26
+
27
+ ## Parse flags.
28
+ while ( $ARGV[0] =~ /^-/ ) {
29
+ my $flag = shift @ARGV;
30
+ last if ( $flag eq '--');
31
+ if ( $flag eq '-old') {
32
+ $x509hash = "-subject_hash_old";
33
+ $crlhash = "-hash_old";
34
+ } elsif ( $flag eq '-h' || $flag eq '-help' ) {
35
+ help();
36
+ } elsif ( $flag eq '-n' ) {
37
+ $removelinks = 0;
38
+ } elsif ( $flag eq '-v' ) {
39
+ $verbose++;
40
+ }
41
+ else {
42
+ print STDERR "Usage error; try -h.\n";
43
+ exit 1;
44
+ }
45
+ }
46
+
47
+ sub help {
48
+ print "Usage: c_rehash [-old] [-h] [-help] [-v] [dirs...]\n";
49
+ print " -old use old-style digest\n";
50
+ print " -h or -help print this help text\n";
51
+ print " -v print files removed and linked\n";
52
+ exit 0;
53
+ }
54
+
55
+ eval "require Cwd";
56
+ if (defined(&Cwd::getcwd)) {
57
+ $pwd=Cwd::getcwd();
58
+ } else {
59
+ $pwd=`pwd`;
60
+ chomp($pwd);
61
+ }
62
+
63
+ # DOS/Win32 or Unix delimiter? Prefix our installdir, then search.
64
+ my $path_delim = ($pwd =~ /^[a-z]\:/i) ? ';' : ':';
65
+ $ENV{PATH} = "$prefix/bin" . ($ENV{PATH} ? $path_delim . $ENV{PATH} : "");
66
+
67
+ if (!(-f $openssl && -x $openssl)) {
68
+ my $found = 0;
69
+ foreach (split /$path_delim/, $ENV{PATH}) {
70
+ if (-f "$_/$openssl" && -x "$_/$openssl") {
71
+ $found = 1;
72
+ $openssl = "$_/$openssl";
73
+ last;
74
+ }
75
+ }
76
+ if ($found == 0) {
77
+ print STDERR "c_rehash: rehashing skipped ('openssl' program not available)\n";
78
+ exit 0;
79
+ }
80
+ }
81
+
82
+ if (@ARGV) {
83
+ @dirlist = @ARGV;
84
+ } elsif ($ENV{SSL_CERT_DIR}) {
85
+ @dirlist = split /$path_delim/, $ENV{SSL_CERT_DIR};
86
+ } else {
87
+ $dirlist[0] = "$dir/certs";
88
+ }
89
+
90
+ if (-d $dirlist[0]) {
91
+ chdir $dirlist[0];
92
+ $openssl="$pwd/$openssl" if (!(-f $openssl && -x $openssl));
93
+ chdir $pwd;
94
+ }
95
+
96
+ foreach (@dirlist) {
97
+ if (-d $_ ) {
98
+ if ( -w $_) {
99
+ hash_dir($_);
100
+ } else {
101
+ print "Skipping $_, can't write\n";
102
+ $errorcount++;
103
+ }
104
+ }
105
+ }
106
+ exit($errorcount);
107
+
108
+ sub copy_file {
109
+ my ($src_fname, $dst_fname) = @_;
110
+
111
+ if (open(my $in, "<", $src_fname)) {
112
+ if (open(my $out, ">", $dst_fname)) {
113
+ print $out $_ while (<$in>);
114
+ close $out;
115
+ } else {
116
+ warn "Cannot open $dst_fname for write, $!";
117
+ }
118
+ close $in;
119
+ } else {
120
+ warn "Cannot open $src_fname for read, $!";
121
+ }
122
+ }
123
+
124
+ sub hash_dir {
125
+ my $dir = shift;
126
+ my %hashlist;
127
+
128
+ print "Doing $dir\n";
129
+
130
+ if (!chdir $dir) {
131
+ print STDERR "WARNING: Cannot chdir to '$dir', $!\n";
132
+ return;
133
+ }
134
+
135
+ opendir(DIR, ".") || print STDERR "WARNING: Cannot opendir '.', $!\n";
136
+ my @flist = sort readdir(DIR);
137
+ closedir DIR;
138
+ if ( $removelinks ) {
139
+ # Delete any existing symbolic links
140
+ foreach (grep {/^[\da-f]+\.r{0,1}\d+$/} @flist) {
141
+ if (-l $_) {
142
+ print "unlink $_\n" if $verbose;
143
+ unlink $_ || warn "Can't unlink $_, $!\n";
144
+ }
145
+ }
146
+ }
147
+ FILE: foreach $fname (grep {/\.(pem|crt|cer|crl)$/} @flist) {
148
+ # Check to see if certificates and/or CRLs present.
149
+ my ($cert, $crl) = check_file($fname);
150
+ if (!$cert && !$crl) {
151
+ print STDERR "WARNING: $fname does not contain a certificate or CRL: skipping\n";
152
+ next;
153
+ }
154
+ link_hash_cert($fname) if ($cert);
155
+ link_hash_crl($fname) if ($crl);
156
+ }
157
+
158
+ chdir $pwd;
159
+ }
160
+
161
+ sub check_file {
162
+ my ($is_cert, $is_crl) = (0,0);
163
+ my $fname = $_[0];
164
+
165
+ open(my $in, "<", $fname);
166
+ while(<$in>) {
167
+ if (/^-----BEGIN (.*)-----/) {
168
+ my $hdr = $1;
169
+ if ($hdr =~ /^(X509 |TRUSTED |)CERTIFICATE$/) {
170
+ $is_cert = 1;
171
+ last if ($is_crl);
172
+ } elsif ($hdr eq "X509 CRL") {
173
+ $is_crl = 1;
174
+ last if ($is_cert);
175
+ }
176
+ }
177
+ }
178
+ close $in;
179
+ return ($is_cert, $is_crl);
180
+ }
181
+
182
+ sub compute_hash {
183
+ my $fh;
184
+ if ( $^O eq "VMS" ) {
185
+ # VMS uses the open through shell
186
+ # The file names are safe there and list form is unsupported
187
+ if (!open($fh, "-|", join(' ', @_))) {
188
+ print STDERR "Cannot compute hash on '$fname'\n";
189
+ return;
190
+ }
191
+ } else {
192
+ if (!open($fh, "-|", @_)) {
193
+ print STDERR "Cannot compute hash on '$fname'\n";
194
+ return;
195
+ }
196
+ binmode($fh, ":crlf");
197
+ }
198
+ return (<$fh>, <$fh>);
199
+ }
200
+
201
+ # Link a certificate to its subject name hash value, each hash is of
202
+ # the form <hash>.<n> where n is an integer. If the hash value already exists
203
+ # then we need to up the value of n, unless its a duplicate in which
204
+ # case we skip the link. We check for duplicates by comparing the
205
+ # certificate fingerprints
206
+
207
+ sub link_hash_cert {
208
+ link_hash($_[0], 'cert');
209
+ }
210
+
211
+ # Same as above except for a CRL. CRL links are of the form <hash>.r<n>
212
+
213
+ sub link_hash_crl {
214
+ link_hash($_[0], 'crl');
215
+ }
216
+
217
+ sub link_hash {
218
+ my ($fname, $type) = @_;
219
+ my $is_cert = $type eq 'cert';
220
+
221
+ my ($hash, $fprint) = compute_hash($openssl,
222
+ $is_cert ? "x509" : "crl",
223
+ $is_cert ? $x509hash : $crlhash,
224
+ "-fingerprint", "-noout",
225
+ "-in", $fname);
226
+ chomp $hash;
227
+ $hash =~ s/^.*=// if !$is_cert;
228
+ chomp $fprint;
229
+ return if !$hash;
230
+ $fprint =~ s/^.*=//;
231
+ $fprint =~ tr/://d;
232
+ my $suffix = 0;
233
+ # Search for an unused hash filename
234
+ my $crlmark = $is_cert ? "" : "r";
235
+ while(exists $hashlist{"$hash.$crlmark$suffix"}) {
236
+ # Hash matches: if fingerprint matches its a duplicate cert
237
+ if ($hashlist{"$hash.$crlmark$suffix"} eq $fprint) {
238
+ my $what = $is_cert ? 'certificate' : 'CRL';
239
+ print STDERR "WARNING: Skipping duplicate $what $fname\n";
240
+ return;
241
+ }
242
+ $suffix++;
243
+ }
244
+ $hash .= ".$crlmark$suffix";
245
+ if ($symlink_exists) {
246
+ print "link $fname -> $hash\n" if $verbose;
247
+ symlink $fname, $hash || warn "Can't symlink, $!";
248
+ } else {
249
+ print "copy $fname -> $hash\n" if $verbose;
250
+ copy_file($fname, $hash);
251
+ }
252
+ $hashlist{$hash} = $fprint;
253
+ }
bin/captoinfo ADDED
Binary file (92.2 kB). View file
 
bin/clear ADDED
Binary file (14.3 kB). View file
 
bin/dashscope ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ #!/usr/local/miniconda3/envs/phantom/bin/python3.11
2
+ import sys
3
+ from dashscope.cli import main
4
+ if __name__ == '__main__':
5
+ sys.argv[0] = sys.argv[0].removesuffix('.exe')
6
+ sys.exit(main())
bin/diffusers-cli ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ #!/usr/local/miniconda3/envs/phantom/bin/python3.11
2
+ import sys
3
+ from diffusers.commands.diffusers_cli import main
4
+ if __name__ == '__main__':
5
+ sys.argv[0] = sys.argv[0].removesuffix('.exe')
6
+ sys.exit(main())
bin/f2py ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ #!/usr/local/miniconda3/envs/phantom/bin/python3.11
2
+ import sys
3
+ from numpy.f2py.f2py2e import main
4
+ if __name__ == '__main__':
5
+ sys.argv[0] = sys.argv[0].removesuffix('.exe')
6
+ sys.exit(main())
bin/fastapi ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ #!/usr/local/miniconda3/envs/phantom/bin/python3.11
2
+ import sys
3
+ from fastapi.cli import main
4
+ if __name__ == '__main__':
5
+ sys.argv[0] = sys.argv[0].removesuffix('.exe')
6
+ sys.exit(main())
bin/ftfy ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ #!/usr/local/miniconda3/envs/phantom/bin/python3.11
2
+ import sys
3
+ from ftfy.cli import main
4
+ if __name__ == '__main__':
5
+ sys.argv[0] = sys.argv[0].removesuffix('.exe')
6
+ sys.exit(main())
bin/gradio ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ #!/usr/local/miniconda3/envs/phantom/bin/python3.11
2
+ import sys
3
+ from gradio.cli import cli
4
+ if __name__ == '__main__':
5
+ sys.argv[0] = sys.argv[0].removesuffix('.exe')
6
+ sys.exit(cli())
bin/hf ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ #!/usr/local/miniconda3/envs/phantom/bin/python3.11
2
+ import sys
3
+ from huggingface_hub.cli.hf import main
4
+ if __name__ == '__main__':
5
+ sys.argv[0] = sys.argv[0].removesuffix('.exe')
6
+ sys.exit(main())
bin/httpx ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ #!/usr/local/miniconda3/envs/phantom/bin/python3.11
2
+ import sys
3
+ from httpx import main
4
+ if __name__ == '__main__':
5
+ sys.argv[0] = sys.argv[0].removesuffix('.exe')
6
+ sys.exit(main())
bin/huggingface-cli ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ #!/usr/local/miniconda3/envs/phantom/bin/python3.11
2
+ import sys
3
+ from huggingface_hub.cli.deprecated_cli import main
4
+ if __name__ == '__main__':
5
+ sys.argv[0] = sys.argv[0].removesuffix('.exe')
6
+ sys.exit(main())
bin/idle3 ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ #!/usr/local/miniconda3/envs/phantom/bin/python3.11
2
+
3
+ from idlelib.pyshell import main
4
+ if __name__ == '__main__':
5
+ main()
bin/idle3.11 ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ #!/usr/local/miniconda3/envs/phantom/bin/python3.11
2
+
3
+ from idlelib.pyshell import main
4
+ if __name__ == '__main__':
5
+ main()
bin/idna ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ #!/usr/local/miniconda3/envs/phantom/bin/python3.11
2
+ import sys
3
+ from idna.cli import main
4
+ if __name__ == '__main__':
5
+ sys.argv[0] = sys.argv[0].removesuffix('.exe')
6
+ sys.exit(main())
bin/imageio_download_bin ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ #!/usr/local/miniconda3/envs/phantom/bin/python3.11
2
+ import sys
3
+ from imageio.__main__ import download_bin_main
4
+ if __name__ == '__main__':
5
+ sys.argv[0] = sys.argv[0].removesuffix('.exe')
6
+ sys.exit(download_bin_main())
bin/imageio_remove_bin ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ #!/usr/local/miniconda3/envs/phantom/bin/python3.11
2
+ import sys
3
+ from imageio.__main__ import remove_bin_main
4
+ if __name__ == '__main__':
5
+ sys.argv[0] = sys.argv[0].removesuffix('.exe')
6
+ sys.exit(remove_bin_main())
bin/infocmp ADDED
Binary file (63.5 kB). View file
 
bin/infotocap ADDED
Binary file (92.2 kB). View file
 
bin/isympy ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ #!/usr/local/miniconda3/envs/phantom/bin/python3.11
2
+ import sys
3
+ from isympy import main
4
+ if __name__ == '__main__':
5
+ sys.argv[0] = sys.argv[0].removesuffix('.exe')
6
+ sys.exit(main())
bin/lzcmp ADDED
@@ -0,0 +1,224 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/sh
2
+ # SPDX-License-Identifier: GPL-2.0-or-later
3
+
4
+ # Copyright (C) 1998, 2002, 2006, 2007 Free Software Foundation
5
+ # Copyright (C) 1993 Jean-loup Gailly
6
+
7
+ # Modified for XZ Utils by Andrew Dudman and Lasse Collin.
8
+
9
+ # This program is free software; you can redistribute it and/or modify
10
+ # it under the terms of the GNU General Public License as published by
11
+ # the Free Software Foundation; either version 2 of the License, or
12
+ # (at your option) any later version.
13
+
14
+ # This program is distributed in the hope that it will be useful,
15
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
16
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
+ # GNU General Public License for more details.
18
+
19
+ # shellcheck shell=sh disable=SC1003,SC2016
20
+
21
+
22
+ #SET_PATH - This line is a placeholder to ease patching this script.
23
+
24
+ # Instead of unsetting XZ_OPT, just make sure that xz will use file format
25
+ # autodetection. This way memory usage limit and thread limit can be
26
+ # specified via XZ_OPT. With gzip, bzip2, and lzop it's OK to just unset the
27
+ # environment variables.
28
+ xz='xz --format=auto'
29
+ unset GZIP BZIP BZIP2 LZOP
30
+
31
+ case ${0##*/} in
32
+ *cmp*) prog=xzcmp; cmp=${CMP:-cmp};;
33
+ *) prog=xzdiff; cmp=${DIFF:-diff};;
34
+ esac
35
+
36
+ version="$prog (XZ Utils) 5.8.2"
37
+
38
+ usage="Usage: ${0##*/} [OPTION]... FILE1 [FILE2]
39
+ Compare FILE1 to FILE2, using their uncompressed contents if they are
40
+ compressed. If FILE2 is omitted, then the files compared are FILE1 and
41
+ FILE1 from which the compression format suffix has been stripped.
42
+
43
+ Do comparisons like '$cmp' does. OPTIONs are the same as for '$cmp'.
44
+
45
+ Report bugs to <xz@tukaani.org>."
46
+
47
+ # sed script to escape all ' for the shell, and then (to handle trailing
48
+ # newlines correctly) turn trailing X on last line into '.
49
+ escape='
50
+ s/'\''/'\''\\'\'''\''/g
51
+ $s/X$/'\''/
52
+ '
53
+
54
+ while :; do
55
+ case $1 in
56
+ --h*) printf '%s\n' "$usage" || exit 2; exit;;
57
+ --v*) printf '%s\n' "$version" || exit 2; exit;;
58
+ --) shift; break;;
59
+ -*\'*) cmp="$cmp '"`printf '%sX\n' "$1" | sed "$escape"`;;
60
+ -?*) cmp="$cmp '$1'";;
61
+ *) break;;
62
+ esac
63
+ shift
64
+ done
65
+ cmp="$cmp --"
66
+
67
+ for file; do
68
+ test "X$file" = X- || true < "$file" || exit 2
69
+ done
70
+
71
+ # xz needs -qQ to ignore warnings like unsupported check type.
72
+ xz1="$xz -qQ"
73
+ xz2="$xz -qQ"
74
+ xz_status=0
75
+ exec 3>&1
76
+
77
+ if test $# -eq 1; then
78
+ case $1 in
79
+ *[-.]xz | *[-.]lzma | *[-.]lz | *.t[lx]z)
80
+ ;;
81
+ *[-.]bz2 | *.tbz | *.tbz2)
82
+ xz1=bzip2;;
83
+ *[-.][zZ] | *_z | *[-.]gz | *.t[ag]z)
84
+ xz1=gzip;;
85
+ *[-.]lzo | *.tzo)
86
+ xz1=lzop;;
87
+ *[-.]zst | *.tzst)
88
+ xz1='zstd -q';;
89
+ *[-.]lz4)
90
+ xz1=lz4;;
91
+ *)
92
+ printf '%s\n' "$0: $1: Unknown compressed file name suffix" >&2
93
+ exit 2;;
94
+ esac
95
+ # The FILE variable is used with eval, and shellcheck doesn't see that.
96
+ # shellcheck disable=SC2034
97
+ case $1 in
98
+ *[-.][zZ] | *_z | *[-.][gx]z | *[-.]bz2 | *[-.]lzma | *[-.]lz | *[-.]lzo | *[-.]zst | *[-.]lz4)
99
+ FILE=`expr "X$1" : 'X\(.*\)[-.][abglmostxzZ24]*$'`;;
100
+ *.t[abglx]z)
101
+ FILE=`expr "X$1" : 'X\(.*[-.]t\)[abglx]z$'`ar;;
102
+ *.tbz2)
103
+ FILE=`expr "X$1" : 'X\(.*[-.]t\)bz2$'`ar;;
104
+ *.tzo)
105
+ FILE=`expr "X$1" : 'X\(.*[-.]t\)zo$'`ar;;
106
+ *.tzst)
107
+ FILE=`expr "X$1" : 'X\(.*[-.]t\)zst$'`ar;;
108
+ esac
109
+ xz_status=$(
110
+ exec 4>&1
111
+ ($xz1 -cd -- "$1" 4>&-; echo $? >&4) 3>&- | eval "$cmp" - '"$FILE"' >&3
112
+ )
113
+ elif test $# -eq 2; then
114
+ case $1 in
115
+ *[-.]bz2 | *.tbz | *.tbz2) xz1=bzip2;;
116
+ *[-.][zZ] | *_z | *[-.]gz | *.t[ag]z) xz1=gzip;;
117
+ *[-.]lzo | *.tzo) xz1=lzop;;
118
+ *[-.]zst | *.tzst) xz1='zstd -q';;
119
+ *[-.]lz4) xz1=lz4;;
120
+ esac
121
+ case $2 in
122
+ *[-.]bz2 | *.tbz | *.tbz2) xz2=bzip2;;
123
+ *[-.][zZ] | *_z | *[-.]gz | *.t[ag]z) xz2=gzip;;
124
+ *[-.]lzo | *.tzo) xz2=lzop;;
125
+ *[-.]zst | *.tzst) xz2='zstd -q';;
126
+ *[-.]lz4) xz2=lz4;;
127
+ esac
128
+ case $1 in
129
+ *[-.][zZ] | *_z | *[-.][gx]z | *[-.]bz2 | *[-.]lzma | *[-.]lz | *.t[abglx]z | *.tbz2 | *[-.]lzo | *.tzo | *[-.]zst | *.tzst | *[-.]lz4 | -)
130
+ case "$2" in
131
+ *[-.][zZ] | *_z | *[-.][gx]z | *[-.]bz2 | *[-.]lzma | *[-.]lz | *.t[abglx]z | *.tbz2 | *[-.]lzo | *.tzo | *[-.]zst | *.tzst | *[-.]lz4 | -)
132
+ if test "$1$2" = --; then
133
+ xz_status=$(
134
+ exec 4>&1
135
+ ($xz1 -cdf - 4>&-; echo $? >&4) 3>&- |
136
+ eval "$cmp" - - >&3
137
+ )
138
+ elif # Reject Solaris 8's buggy /bin/bash 2.03.
139
+ echo X | (echo X | eval "$cmp" /dev/fd/5 - >/dev/null 2>&1) 5<&0; then
140
+ # NOTE: xz_status will contain two numbers.
141
+ xz_status=$(
142
+ exec 4>&1
143
+ ($xz1 -cdf -- "$1" 4>&-; echo $? >&4) 3>&- |
144
+ ( ($xz2 -cdf -- "$2" 4>&-; echo $? >&4) 3>&- 5<&- </dev/null |
145
+ eval "$cmp" /dev/fd/5 - >&3) 5<&0
146
+ )
147
+ else
148
+ F=`expr "/$2" : '.*/\(.*\)[-.][ablmotxz2]*$'` || F=$prog
149
+ tmp=
150
+ trap '
151
+ test -n "$tmp" && rm -rf "$tmp"
152
+ (exit 2); exit 2
153
+ ' HUP INT PIPE TERM 0
154
+ if type mktemp >/dev/null 2>&1; then
155
+ # Note that FreeBSD's mktemp isn't fully compatible with
156
+ # the implementations from mktemp.org and GNU coreutils.
157
+ # It is important that the -t argument is the last argument
158
+ # and that no "--" is used between -t and the template argument.
159
+ # This way this command works on all implementations.
160
+ tmp=`mktemp -d -t "$prog.XXXXXXXXXX"` || exit 2
161
+ else
162
+ # Fallback code if mktemp is missing. This isn't as
163
+ # robust as using mktemp since this doesn't try with
164
+ # different file names in case of a file name conflict.
165
+ #
166
+ # There's no need to save the original umask since
167
+ # we don't create any non-temp files. Note that using
168
+ # mkdir -m 0077 isn't secure since some mkdir implementations
169
+ # create the dir with the default umask and chmod the
170
+ # the dir afterwards.
171
+ umask 0077
172
+ mkdir -- "${TMPDIR-/tmp}/$prog.$$" || exit 2
173
+ tmp="${TMPDIR-/tmp}/$prog.$$"
174
+ fi
175
+ $xz2 -cdf -- "$2" > "$tmp/$F" || exit 2
176
+ xz_status=$(
177
+ exec 4>&1
178
+ ($xz1 -cdf -- "$1" 4>&-; echo $? >&4) 3>&- |
179
+ eval "$cmp" - '"$tmp/$F"' >&3
180
+ )
181
+ cmp_status=$?
182
+ rm -rf "$tmp" || xz_status=$?
183
+ trap - HUP INT PIPE TERM 0
184
+ (exit $cmp_status)
185
+ fi;;
186
+ *)
187
+ xz_status=$(
188
+ exec 4>&1
189
+ ($xz1 -cdf -- "$1" 4>&-; echo $? >&4) 3>&- |
190
+ eval "$cmp" - '"$2"' >&3
191
+ );;
192
+ esac;;
193
+ *)
194
+ case "$2" in
195
+ *[-.][zZ] | *_z | *[-.][gx]z | *[-.]bz2 | *[-.]lzma | *[-.]lz | *.t[abglx]z | *.tbz2 | *[-.]lzo | *.tzo | *[-.]zst | *.tzst | *[-.]lz4 | -)
196
+ xz_status=$(
197
+ exec 4>&1
198
+ ($xz2 -cdf -- "$2" 4>&-; echo $? >&4) 3>&- |
199
+ eval "$cmp" '"$1"' - >&3
200
+ );;
201
+ *)
202
+ eval "$cmp" '"$1"' '"$2"';;
203
+ esac;;
204
+ esac
205
+ else
206
+ printf '%s\n' "$0: Invalid number of operands; try '${0##*/} --help' for help" >&2
207
+ exit 2
208
+ fi
209
+
210
+ cmp_status=$?
211
+ for num in $xz_status ; do
212
+ # 0 from decompressor means successful decompression. SIGPIPE from
213
+ # decompressor is possible when diff or cmp exits before the whole file
214
+ # has been decompressed. In that case we want to retain the exit status
215
+ # from diff or cmp. Note that using "trap '' PIPE" is not possible
216
+ # because gzip changes its behavior (including exit status) if SIGPIPE
217
+ # is ignored.
218
+ test "$num" -eq 0 && continue
219
+ test "$num" -ge 128 \
220
+ && test "$(kill -l "$num" 2> /dev/null)" = "PIPE" \
221
+ && continue
222
+ exit 2
223
+ done
224
+ exit $cmp_status
bin/lzdiff ADDED
@@ -0,0 +1,224 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/sh
2
+ # SPDX-License-Identifier: GPL-2.0-or-later
3
+
4
+ # Copyright (C) 1998, 2002, 2006, 2007 Free Software Foundation
5
+ # Copyright (C) 1993 Jean-loup Gailly
6
+
7
+ # Modified for XZ Utils by Andrew Dudman and Lasse Collin.
8
+
9
+ # This program is free software; you can redistribute it and/or modify
10
+ # it under the terms of the GNU General Public License as published by
11
+ # the Free Software Foundation; either version 2 of the License, or
12
+ # (at your option) any later version.
13
+
14
+ # This program is distributed in the hope that it will be useful,
15
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
16
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
+ # GNU General Public License for more details.
18
+
19
+ # shellcheck shell=sh disable=SC1003,SC2016
20
+
21
+
22
+ #SET_PATH - This line is a placeholder to ease patching this script.
23
+
24
+ # Instead of unsetting XZ_OPT, just make sure that xz will use file format
25
+ # autodetection. This way memory usage limit and thread limit can be
26
+ # specified via XZ_OPT. With gzip, bzip2, and lzop it's OK to just unset the
27
+ # environment variables.
28
+ xz='xz --format=auto'
29
+ unset GZIP BZIP BZIP2 LZOP
30
+
31
+ case ${0##*/} in
32
+ *cmp*) prog=xzcmp; cmp=${CMP:-cmp};;
33
+ *) prog=xzdiff; cmp=${DIFF:-diff};;
34
+ esac
35
+
36
+ version="$prog (XZ Utils) 5.8.2"
37
+
38
+ usage="Usage: ${0##*/} [OPTION]... FILE1 [FILE2]
39
+ Compare FILE1 to FILE2, using their uncompressed contents if they are
40
+ compressed. If FILE2 is omitted, then the files compared are FILE1 and
41
+ FILE1 from which the compression format suffix has been stripped.
42
+
43
+ Do comparisons like '$cmp' does. OPTIONs are the same as for '$cmp'.
44
+
45
+ Report bugs to <xz@tukaani.org>."
46
+
47
+ # sed script to escape all ' for the shell, and then (to handle trailing
48
+ # newlines correctly) turn trailing X on last line into '.
49
+ escape='
50
+ s/'\''/'\''\\'\'''\''/g
51
+ $s/X$/'\''/
52
+ '
53
+
54
+ while :; do
55
+ case $1 in
56
+ --h*) printf '%s\n' "$usage" || exit 2; exit;;
57
+ --v*) printf '%s\n' "$version" || exit 2; exit;;
58
+ --) shift; break;;
59
+ -*\'*) cmp="$cmp '"`printf '%sX\n' "$1" | sed "$escape"`;;
60
+ -?*) cmp="$cmp '$1'";;
61
+ *) break;;
62
+ esac
63
+ shift
64
+ done
65
+ cmp="$cmp --"
66
+
67
+ for file; do
68
+ test "X$file" = X- || true < "$file" || exit 2
69
+ done
70
+
71
+ # xz needs -qQ to ignore warnings like unsupported check type.
72
+ xz1="$xz -qQ"
73
+ xz2="$xz -qQ"
74
+ xz_status=0
75
+ exec 3>&1
76
+
77
+ if test $# -eq 1; then
78
+ case $1 in
79
+ *[-.]xz | *[-.]lzma | *[-.]lz | *.t[lx]z)
80
+ ;;
81
+ *[-.]bz2 | *.tbz | *.tbz2)
82
+ xz1=bzip2;;
83
+ *[-.][zZ] | *_z | *[-.]gz | *.t[ag]z)
84
+ xz1=gzip;;
85
+ *[-.]lzo | *.tzo)
86
+ xz1=lzop;;
87
+ *[-.]zst | *.tzst)
88
+ xz1='zstd -q';;
89
+ *[-.]lz4)
90
+ xz1=lz4;;
91
+ *)
92
+ printf '%s\n' "$0: $1: Unknown compressed file name suffix" >&2
93
+ exit 2;;
94
+ esac
95
+ # The FILE variable is used with eval, and shellcheck doesn't see that.
96
+ # shellcheck disable=SC2034
97
+ case $1 in
98
+ *[-.][zZ] | *_z | *[-.][gx]z | *[-.]bz2 | *[-.]lzma | *[-.]lz | *[-.]lzo | *[-.]zst | *[-.]lz4)
99
+ FILE=`expr "X$1" : 'X\(.*\)[-.][abglmostxzZ24]*$'`;;
100
+ *.t[abglx]z)
101
+ FILE=`expr "X$1" : 'X\(.*[-.]t\)[abglx]z$'`ar;;
102
+ *.tbz2)
103
+ FILE=`expr "X$1" : 'X\(.*[-.]t\)bz2$'`ar;;
104
+ *.tzo)
105
+ FILE=`expr "X$1" : 'X\(.*[-.]t\)zo$'`ar;;
106
+ *.tzst)
107
+ FILE=`expr "X$1" : 'X\(.*[-.]t\)zst$'`ar;;
108
+ esac
109
+ xz_status=$(
110
+ exec 4>&1
111
+ ($xz1 -cd -- "$1" 4>&-; echo $? >&4) 3>&- | eval "$cmp" - '"$FILE"' >&3
112
+ )
113
+ elif test $# -eq 2; then
114
+ case $1 in
115
+ *[-.]bz2 | *.tbz | *.tbz2) xz1=bzip2;;
116
+ *[-.][zZ] | *_z | *[-.]gz | *.t[ag]z) xz1=gzip;;
117
+ *[-.]lzo | *.tzo) xz1=lzop;;
118
+ *[-.]zst | *.tzst) xz1='zstd -q';;
119
+ *[-.]lz4) xz1=lz4;;
120
+ esac
121
+ case $2 in
122
+ *[-.]bz2 | *.tbz | *.tbz2) xz2=bzip2;;
123
+ *[-.][zZ] | *_z | *[-.]gz | *.t[ag]z) xz2=gzip;;
124
+ *[-.]lzo | *.tzo) xz2=lzop;;
125
+ *[-.]zst | *.tzst) xz2='zstd -q';;
126
+ *[-.]lz4) xz2=lz4;;
127
+ esac
128
+ case $1 in
129
+ *[-.][zZ] | *_z | *[-.][gx]z | *[-.]bz2 | *[-.]lzma | *[-.]lz | *.t[abglx]z | *.tbz2 | *[-.]lzo | *.tzo | *[-.]zst | *.tzst | *[-.]lz4 | -)
130
+ case "$2" in
131
+ *[-.][zZ] | *_z | *[-.][gx]z | *[-.]bz2 | *[-.]lzma | *[-.]lz | *.t[abglx]z | *.tbz2 | *[-.]lzo | *.tzo | *[-.]zst | *.tzst | *[-.]lz4 | -)
132
+ if test "$1$2" = --; then
133
+ xz_status=$(
134
+ exec 4>&1
135
+ ($xz1 -cdf - 4>&-; echo $? >&4) 3>&- |
136
+ eval "$cmp" - - >&3
137
+ )
138
+ elif # Reject Solaris 8's buggy /bin/bash 2.03.
139
+ echo X | (echo X | eval "$cmp" /dev/fd/5 - >/dev/null 2>&1) 5<&0; then
140
+ # NOTE: xz_status will contain two numbers.
141
+ xz_status=$(
142
+ exec 4>&1
143
+ ($xz1 -cdf -- "$1" 4>&-; echo $? >&4) 3>&- |
144
+ ( ($xz2 -cdf -- "$2" 4>&-; echo $? >&4) 3>&- 5<&- </dev/null |
145
+ eval "$cmp" /dev/fd/5 - >&3) 5<&0
146
+ )
147
+ else
148
+ F=`expr "/$2" : '.*/\(.*\)[-.][ablmotxz2]*$'` || F=$prog
149
+ tmp=
150
+ trap '
151
+ test -n "$tmp" && rm -rf "$tmp"
152
+ (exit 2); exit 2
153
+ ' HUP INT PIPE TERM 0
154
+ if type mktemp >/dev/null 2>&1; then
155
+ # Note that FreeBSD's mktemp isn't fully compatible with
156
+ # the implementations from mktemp.org and GNU coreutils.
157
+ # It is important that the -t argument is the last argument
158
+ # and that no "--" is used between -t and the template argument.
159
+ # This way this command works on all implementations.
160
+ tmp=`mktemp -d -t "$prog.XXXXXXXXXX"` || exit 2
161
+ else
162
+ # Fallback code if mktemp is missing. This isn't as
163
+ # robust as using mktemp since this doesn't try with
164
+ # different file names in case of a file name conflict.
165
+ #
166
+ # There's no need to save the original umask since
167
+ # we don't create any non-temp files. Note that using
168
+ # mkdir -m 0077 isn't secure since some mkdir implementations
169
+ # create the dir with the default umask and chmod the
170
+ # the dir afterwards.
171
+ umask 0077
172
+ mkdir -- "${TMPDIR-/tmp}/$prog.$$" || exit 2
173
+ tmp="${TMPDIR-/tmp}/$prog.$$"
174
+ fi
175
+ $xz2 -cdf -- "$2" > "$tmp/$F" || exit 2
176
+ xz_status=$(
177
+ exec 4>&1
178
+ ($xz1 -cdf -- "$1" 4>&-; echo $? >&4) 3>&- |
179
+ eval "$cmp" - '"$tmp/$F"' >&3
180
+ )
181
+ cmp_status=$?
182
+ rm -rf "$tmp" || xz_status=$?
183
+ trap - HUP INT PIPE TERM 0
184
+ (exit $cmp_status)
185
+ fi;;
186
+ *)
187
+ xz_status=$(
188
+ exec 4>&1
189
+ ($xz1 -cdf -- "$1" 4>&-; echo $? >&4) 3>&- |
190
+ eval "$cmp" - '"$2"' >&3
191
+ );;
192
+ esac;;
193
+ *)
194
+ case "$2" in
195
+ *[-.][zZ] | *_z | *[-.][gx]z | *[-.]bz2 | *[-.]lzma | *[-.]lz | *.t[abglx]z | *.tbz2 | *[-.]lzo | *.tzo | *[-.]zst | *.tzst | *[-.]lz4 | -)
196
+ xz_status=$(
197
+ exec 4>&1
198
+ ($xz2 -cdf -- "$2" 4>&-; echo $? >&4) 3>&- |
199
+ eval "$cmp" '"$1"' - >&3
200
+ );;
201
+ *)
202
+ eval "$cmp" '"$1"' '"$2"';;
203
+ esac;;
204
+ esac
205
+ else
206
+ printf '%s\n' "$0: Invalid number of operands; try '${0##*/} --help' for help" >&2
207
+ exit 2
208
+ fi
209
+
210
+ cmp_status=$?
211
+ for num in $xz_status ; do
212
+ # 0 from decompressor means successful decompression. SIGPIPE from
213
+ # decompressor is possible when diff or cmp exits before the whole file
214
+ # has been decompressed. In that case we want to retain the exit status
215
+ # from diff or cmp. Note that using "trap '' PIPE" is not possible
216
+ # because gzip changes its behavior (including exit status) if SIGPIPE
217
+ # is ignored.
218
+ test "$num" -eq 0 && continue
219
+ test "$num" -ge 128 \
220
+ && test "$(kill -l "$num" 2> /dev/null)" = "PIPE" \
221
+ && continue
222
+ exit 2
223
+ done
224
+ exit $cmp_status
bin/lzegrep ADDED
@@ -0,0 +1,302 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/sh
2
+ # SPDX-License-Identifier: GPL-2.0-or-later
3
+
4
+ # xzgrep -- a wrapper around a grep program that decompresses files as needed
5
+ # Adapted from a version sent by Charles Levert <charles@comm.polymtl.ca>
6
+
7
+ # Copyright (C) 1998, 2001, 2002, 2006, 2007 Free Software Foundation
8
+ # Copyright (C) 1993 Jean-loup Gailly
9
+
10
+ # Modified for XZ Utils by Andrew Dudman and Lasse Collin.
11
+
12
+ # This program is free software; you can redistribute it and/or modify
13
+ # it under the terms of the GNU General Public License as published by
14
+ # the Free Software Foundation; either version 2 of the License, or
15
+ # (at your option) any later version.
16
+
17
+ # This program is distributed in the hope that it will be useful,
18
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
19
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
+ # GNU General Public License for more details.
21
+
22
+ # shellcheck shell=sh disable=SC1003,SC2016
23
+
24
+
25
+ #SET_PATH - This line is a placeholder to ease patching this script.
26
+
27
+ # Instead of unsetting XZ_OPT, just make sure that xz will use file format
28
+ # autodetection. This way memory usage limit and thread limit can be
29
+ # specified via XZ_OPT. With gzip, bzip2, and lzop it's OK to just unset the
30
+ # environment variables.
31
+ xz='xz --format=auto'
32
+ unset GZIP BZIP BZIP2 LZOP
33
+
34
+ case ${0##*/} in
35
+ *egrep*) prog=xzegrep; grep=${GREP:-grep -E};;
36
+ *fgrep*) prog=xzfgrep; grep=${GREP:-grep -F};;
37
+ *) prog=xzgrep; grep=${GREP:-grep};;
38
+ esac
39
+
40
+ version="$prog (XZ Utils) 5.8.2"
41
+
42
+ usage="Usage: ${0##*/} [OPTION]... [-e] PATTERN [FILE]...
43
+ Look for instances of PATTERN in the input FILEs, using their
44
+ uncompressed contents if they are compressed.
45
+
46
+ OPTIONs are the same as for '$grep'.
47
+
48
+ Report bugs to <xz@tukaani.org>."
49
+
50
+ # sed script to escape all ' for the shell, and then (to handle trailing
51
+ # newlines correctly) turn trailing X on last line into '.
52
+ escape='
53
+ s/'\''/'\''\\'\'''\''/g
54
+ $s/X$/'\''/
55
+ '
56
+ operands=
57
+ have_pat=0
58
+ files_with_matches=0
59
+ files_without_matches=0
60
+ no_filename=0
61
+ with_filename=0
62
+
63
+ # See if -H and --label options are supported (GNU and *BSDs).
64
+ if test f:x = "$(eval "echo x | $grep -H --label=f x 2> /dev/null")"; then
65
+ grep_supports_label=1
66
+ else
67
+ grep_supports_label=0
68
+ fi
69
+
70
+ while test $# -ne 0; do
71
+ option=$1
72
+ shift
73
+ optarg=
74
+
75
+ case $option in
76
+ (-[0123456789abcdEFGhHiIKlLnoPqrRsTuUvVwxyzZ]*[!0123456789]*)
77
+ # Something like -Fiv was specified, that is, $option contains more
78
+ # than one option of which the first option (in this example -F)
79
+ # doesn't take an argument. Split the first option into a standalone
80
+ # argument and continue parsing the rest of the options (in this example,
81
+ # replace -Fiv with -iv in the argument list and set option=-F).
82
+ #
83
+ # If there are digits [0-9] they are treated as if they were a single
84
+ # option character because this syntax is an alias for -C for GNU grep.
85
+ # For example, "grep -25F" is equivalent to "grep -C25 -F". If only
86
+ # digits are specified like "grep -25" we don't get here because the
87
+ # above pattern in the case-statement doesn't match such strings.
88
+ arg2=-\'$(LC_ALL=C expr "X${option}X" : 'X-.[0-9]*\(.*\)' |
89
+ LC_ALL=C sed "$escape")
90
+ eval "set -- $arg2 "'${1+"$@"}'
91
+ option=$(LC_ALL=C expr "X$option" : 'X\(-.[0-9]*\)');;
92
+ (--binary-*=* | --[lm]a*=* | --reg*=*)
93
+ # These options require an argument and an argument has been provided
94
+ # with the --foo=argument syntax. All is good.
95
+ ;;
96
+ (-[ABCDefmX] | --binary-* | --file | --[lm]a* | --reg*)
97
+ # These options require an argument which should now be in $1.
98
+ # If it isn't, display an error and exit.
99
+ case ${1?"$option option requires an argument"} in
100
+ (*\'*)
101
+ optarg=" '"$(printf '%sX\n' "$1" | LC_ALL=C sed "$escape");;
102
+ (*)
103
+ optarg=" '$1'";;
104
+ esac
105
+ shift;;
106
+ (--)
107
+ break;;
108
+ (-?*)
109
+ ;;
110
+ (*)
111
+ case $option in
112
+ (*\'*)
113
+ operands="$operands '"$(printf '%sX\n' "$option" |
114
+ LC_ALL=C sed "$escape");;
115
+ (*)
116
+ operands="$operands '$option'";;
117
+ esac
118
+ ${POSIXLY_CORRECT+break}
119
+ continue;;
120
+ esac
121
+
122
+ case $option in
123
+ (-[drRzZ] | --di* | --exc* | --inc* | --rec* | --nu*)
124
+ printf >&2 '%s: %s: Option not supported\n' "$0" "$option"
125
+ exit 2;;
126
+ (-[ef]* | --file | --file=* | --reg*)
127
+ have_pat=1;;
128
+ (--h | --he | --hel | --help)
129
+ printf '%s\n' "$usage" || exit 2
130
+ exit;;
131
+ (-H | --wi | --wit | --with | --with- | --with-f | --with-fi \
132
+ | --with-fil | --with-file | --with-filen | --with-filena | --with-filenam \
133
+ | --with-filename)
134
+ with_filename=1
135
+ continue;;
136
+ (-l | --files-with-*)
137
+ files_with_matches=1
138
+ continue;;
139
+ (-L | --files-witho*)
140
+ files_without_matches=1
141
+ continue;;
142
+ (-h | --no-f*)
143
+ no_filename=1;;
144
+ (-V | --v | --ve | --ver | --vers | --versi | --versio | --version)
145
+ printf '%s\n' "$version" || exit 2
146
+ exit;;
147
+ esac
148
+
149
+ case $option in
150
+ (*\'?*)
151
+ option=\'$(printf '%sX\n' "$option" | LC_ALL=C sed "$escape");;
152
+ (*)
153
+ option="'$option'";;
154
+ esac
155
+
156
+ grep="$grep $option$optarg"
157
+ done
158
+
159
+ eval "set -- $operands "'${1+"$@"}'
160
+
161
+ if test $have_pat -eq 0; then
162
+ case ${1?"Missing pattern; try '${0##*/} --help' for help"} in
163
+ (*\'*)
164
+ grep="$grep -e '"$(printf '%sX\n' "$1" | LC_ALL=C sed "$escape");;
165
+ (*)
166
+ grep="$grep -e '$1'";;
167
+ esac
168
+ shift
169
+ fi
170
+
171
+ if test $# -eq 0; then
172
+ set -- -
173
+ fi
174
+
175
+ exec 3>&1
176
+
177
+ # res=1 means that no file matched yet
178
+ res=1
179
+
180
+ for i; do
181
+ case $i in
182
+ *[-.][zZ] | *_z | *[-.]gz | *.t[ag]z) uncompress="gzip -cdf";;
183
+ *[-.]bz2 | *[-.]tbz | *.tbz2) uncompress="bzip2 -cdf";;
184
+ *[-.]lzo | *[-.]tzo) uncompress="lzop -cdf";;
185
+ *[-.]zst | *[-.]tzst) uncompress="zstd -cdfq";; # zstd needs -q.
186
+ *[-.]lz4) uncompress="lz4 -cdf";;
187
+ *) uncompress="$xz -cdfqQ";; # -qQ to ignore warnings like unsupp. check.
188
+ esac
189
+ # xz_status will hold the decompressor's exit status.
190
+ # Exit status of grep (and in rare cases, printf or sed) is
191
+ # available as the exit status of this assignment command.
192
+ xz_status=$(
193
+ exec 5>&1
194
+ ($uncompress -- "$i" 5>&-; echo $? >&5) 3>&- |
195
+ if test $files_with_matches -eq 1; then
196
+ eval "$grep -q" && { printf '%s\n' "$i" || exit 2; }
197
+ elif test $files_without_matches -eq 1; then
198
+ eval "$grep -q" || {
199
+ r=$?
200
+ if test $r -eq 1; then
201
+ printf '%s\n' "$i" || r=2
202
+ fi
203
+ exit $r
204
+ }
205
+ elif test $with_filename -eq 0 &&
206
+ { test $# -eq 1 || test $no_filename -eq 1; }; then
207
+ eval "$grep"
208
+ elif test $grep_supports_label -eq 1; then
209
+ # The grep implementation in use allows us to specify the filename
210
+ # that grep will prefix to the output lines. This is faster and
211
+ # less prone to security bugs than the fallback method that uses sed.
212
+ # This also avoids confusing output with GNU grep >= 3.5 (2020-09-27)
213
+ # which prints "binary file matches" to stderr instead of stdout.
214
+ #
215
+ # If reading from stdin, let grep use whatever name it prefers for
216
+ # stdin. With GNU grep it is a locale-specific translated string.
217
+ if test "x$i" = "x-"; then
218
+ eval "$grep -H"
219
+ else
220
+ eval "$grep -H --label \"\$i\""
221
+ fi
222
+ else
223
+ # Append a colon so that the last character will never be a newline
224
+ # which would otherwise get lost in shell command substitution.
225
+ i="$i:"
226
+
227
+ # Escape & \ | and newlines only if such characters are present
228
+ # (speed optimization).
229
+ case $i in
230
+ (*'
231
+ '* | *'&'* | *'\'* | *'|'*)
232
+ # If sed fails, set i to a known safe string to ensure that
233
+ # failing sed did not create a half-escaped dangerous string.
234
+ i=$(printf '%s\n' "$i" | LC_ALL=C sed 's/[&\|]/\\&/g; $!s/$/\\/') ||
235
+ i='(unknown filename):';;
236
+ esac
237
+
238
+ # $i already ends with a colon so do not add it here.
239
+ sed_script="s|^|$i|"
240
+
241
+ # If grep or sed fails, pick the larger value of the two exit statuses.
242
+ # If sed fails, use at least 2 since we use >= 2 to indicate errors.
243
+ r=$(
244
+ exec 4>&1
245
+ (eval "$grep" 4>&-; echo $? >&4) 3>&- |
246
+ LC_ALL=C sed "$sed_script" >&3 4>&-
247
+ ) || {
248
+ sed_status=$?
249
+ test "$sed_status" -lt 2 && sed_status=2
250
+ test "$r" -lt "$sed_status" && r=$sed_status
251
+ }
252
+ exit $r
253
+ fi >&3 5>&-
254
+ )
255
+ r=$?
256
+
257
+ # If grep or sed or other non-decompression command failed with a signal,
258
+ # exit immediately and ignore the possible remaining files.
259
+ #
260
+ # NOTE: Instead of 128 + signal_number, some shells use
261
+ # 256 + signal_number (ksh) or 384 + signal_number (yash).
262
+ # This is fine for us since their "exit" and "kill -l" commands take
263
+ # this into account. (At least the versions I tried do but there is
264
+ # a report of an old ksh variant whose "exit" truncates the exit status
265
+ # to 8 bits without any special handling for values indicating a signal.)
266
+ test "$r" -ge 128 && exit "$r"
267
+
268
+ if test -z "$xz_status"; then
269
+ # Something unusual happened, for example, we got a signal and
270
+ # the exit status of the decompressor was never echoed and thus
271
+ # $xz_status is empty. Exit immediately and ignore the possible
272
+ # remaining files.
273
+ exit 2
274
+ elif test "$xz_status" -ge 128; then
275
+ # The decompressor died due to a signal. SIGPIPE is ignored since it can
276
+ # occur if grep exits before the whole file has been decompressed (grep -q
277
+ # can do that). If the decompressor died with some other signal, exit
278
+ # immediately and ignore the possible remaining files.
279
+ test "$(kill -l "$xz_status" 2> /dev/null)" != "PIPE" && exit "$xz_status"
280
+ elif test "$xz_status" -gt 0; then
281
+ # Decompression failed but we will continue with the remaining
282
+ # files anyway. Set exit status to at least 2 to indicate an error.
283
+ test "$r" -lt 2 && r=2
284
+ fi
285
+
286
+ # Since res=1 is the initial value, we only need to care about
287
+ # matches (r == 0) and errors (r >= 2) here; r == 1 can be ignored.
288
+ if test "$r" -ge 2; then
289
+ # An error occurred in decompressor, grep, or some other command. Update
290
+ # res unless a larger error code has been seen with an earlier file.
291
+ test "$res" -lt "$r" && res=$r
292
+ elif test "$r" -eq 0; then
293
+ # grep found a match and no errors occurred. Update res if no errors have
294
+ # occurred with earlier files.
295
+ test "$res" -eq 1 && res=0
296
+ fi
297
+ done
298
+
299
+ # 0: At least one file matched and no errors occurred.
300
+ # 1: No matches were found and no errors occurred.
301
+ # >=2: Error. It's unknown if matches were found.
302
+ exit "$res"
bin/lzfgrep ADDED
@@ -0,0 +1,302 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/sh
2
+ # SPDX-License-Identifier: GPL-2.0-or-later
3
+
4
+ # xzgrep -- a wrapper around a grep program that decompresses files as needed
5
+ # Adapted from a version sent by Charles Levert <charles@comm.polymtl.ca>
6
+
7
+ # Copyright (C) 1998, 2001, 2002, 2006, 2007 Free Software Foundation
8
+ # Copyright (C) 1993 Jean-loup Gailly
9
+
10
+ # Modified for XZ Utils by Andrew Dudman and Lasse Collin.
11
+
12
+ # This program is free software; you can redistribute it and/or modify
13
+ # it under the terms of the GNU General Public License as published by
14
+ # the Free Software Foundation; either version 2 of the License, or
15
+ # (at your option) any later version.
16
+
17
+ # This program is distributed in the hope that it will be useful,
18
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
19
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
+ # GNU General Public License for more details.
21
+
22
+ # shellcheck shell=sh disable=SC1003,SC2016
23
+
24
+
25
+ #SET_PATH - This line is a placeholder to ease patching this script.
26
+
27
+ # Instead of unsetting XZ_OPT, just make sure that xz will use file format
28
+ # autodetection. This way memory usage limit and thread limit can be
29
+ # specified via XZ_OPT. With gzip, bzip2, and lzop it's OK to just unset the
30
+ # environment variables.
31
+ xz='xz --format=auto'
32
+ unset GZIP BZIP BZIP2 LZOP
33
+
34
+ case ${0##*/} in
35
+ *egrep*) prog=xzegrep; grep=${GREP:-grep -E};;
36
+ *fgrep*) prog=xzfgrep; grep=${GREP:-grep -F};;
37
+ *) prog=xzgrep; grep=${GREP:-grep};;
38
+ esac
39
+
40
+ version="$prog (XZ Utils) 5.8.2"
41
+
42
+ usage="Usage: ${0##*/} [OPTION]... [-e] PATTERN [FILE]...
43
+ Look for instances of PATTERN in the input FILEs, using their
44
+ uncompressed contents if they are compressed.
45
+
46
+ OPTIONs are the same as for '$grep'.
47
+
48
+ Report bugs to <xz@tukaani.org>."
49
+
50
+ # sed script to escape all ' for the shell, and then (to handle trailing
51
+ # newlines correctly) turn trailing X on last line into '.
52
+ escape='
53
+ s/'\''/'\''\\'\'''\''/g
54
+ $s/X$/'\''/
55
+ '
56
+ operands=
57
+ have_pat=0
58
+ files_with_matches=0
59
+ files_without_matches=0
60
+ no_filename=0
61
+ with_filename=0
62
+
63
+ # See if -H and --label options are supported (GNU and *BSDs).
64
+ if test f:x = "$(eval "echo x | $grep -H --label=f x 2> /dev/null")"; then
65
+ grep_supports_label=1
66
+ else
67
+ grep_supports_label=0
68
+ fi
69
+
70
+ while test $# -ne 0; do
71
+ option=$1
72
+ shift
73
+ optarg=
74
+
75
+ case $option in
76
+ (-[0123456789abcdEFGhHiIKlLnoPqrRsTuUvVwxyzZ]*[!0123456789]*)
77
+ # Something like -Fiv was specified, that is, $option contains more
78
+ # than one option of which the first option (in this example -F)
79
+ # doesn't take an argument. Split the first option into a standalone
80
+ # argument and continue parsing the rest of the options (in this example,
81
+ # replace -Fiv with -iv in the argument list and set option=-F).
82
+ #
83
+ # If there are digits [0-9] they are treated as if they were a single
84
+ # option character because this syntax is an alias for -C for GNU grep.
85
+ # For example, "grep -25F" is equivalent to "grep -C25 -F". If only
86
+ # digits are specified like "grep -25" we don't get here because the
87
+ # above pattern in the case-statement doesn't match such strings.
88
+ arg2=-\'$(LC_ALL=C expr "X${option}X" : 'X-.[0-9]*\(.*\)' |
89
+ LC_ALL=C sed "$escape")
90
+ eval "set -- $arg2 "'${1+"$@"}'
91
+ option=$(LC_ALL=C expr "X$option" : 'X\(-.[0-9]*\)');;
92
+ (--binary-*=* | --[lm]a*=* | --reg*=*)
93
+ # These options require an argument and an argument has been provided
94
+ # with the --foo=argument syntax. All is good.
95
+ ;;
96
+ (-[ABCDefmX] | --binary-* | --file | --[lm]a* | --reg*)
97
+ # These options require an argument which should now be in $1.
98
+ # If it isn't, display an error and exit.
99
+ case ${1?"$option option requires an argument"} in
100
+ (*\'*)
101
+ optarg=" '"$(printf '%sX\n' "$1" | LC_ALL=C sed "$escape");;
102
+ (*)
103
+ optarg=" '$1'";;
104
+ esac
105
+ shift;;
106
+ (--)
107
+ break;;
108
+ (-?*)
109
+ ;;
110
+ (*)
111
+ case $option in
112
+ (*\'*)
113
+ operands="$operands '"$(printf '%sX\n' "$option" |
114
+ LC_ALL=C sed "$escape");;
115
+ (*)
116
+ operands="$operands '$option'";;
117
+ esac
118
+ ${POSIXLY_CORRECT+break}
119
+ continue;;
120
+ esac
121
+
122
+ case $option in
123
+ (-[drRzZ] | --di* | --exc* | --inc* | --rec* | --nu*)
124
+ printf >&2 '%s: %s: Option not supported\n' "$0" "$option"
125
+ exit 2;;
126
+ (-[ef]* | --file | --file=* | --reg*)
127
+ have_pat=1;;
128
+ (--h | --he | --hel | --help)
129
+ printf '%s\n' "$usage" || exit 2
130
+ exit;;
131
+ (-H | --wi | --wit | --with | --with- | --with-f | --with-fi \
132
+ | --with-fil | --with-file | --with-filen | --with-filena | --with-filenam \
133
+ | --with-filename)
134
+ with_filename=1
135
+ continue;;
136
+ (-l | --files-with-*)
137
+ files_with_matches=1
138
+ continue;;
139
+ (-L | --files-witho*)
140
+ files_without_matches=1
141
+ continue;;
142
+ (-h | --no-f*)
143
+ no_filename=1;;
144
+ (-V | --v | --ve | --ver | --vers | --versi | --versio | --version)
145
+ printf '%s\n' "$version" || exit 2
146
+ exit;;
147
+ esac
148
+
149
+ case $option in
150
+ (*\'?*)
151
+ option=\'$(printf '%sX\n' "$option" | LC_ALL=C sed "$escape");;
152
+ (*)
153
+ option="'$option'";;
154
+ esac
155
+
156
+ grep="$grep $option$optarg"
157
+ done
158
+
159
+ eval "set -- $operands "'${1+"$@"}'
160
+
161
+ if test $have_pat -eq 0; then
162
+ case ${1?"Missing pattern; try '${0##*/} --help' for help"} in
163
+ (*\'*)
164
+ grep="$grep -e '"$(printf '%sX\n' "$1" | LC_ALL=C sed "$escape");;
165
+ (*)
166
+ grep="$grep -e '$1'";;
167
+ esac
168
+ shift
169
+ fi
170
+
171
+ if test $# -eq 0; then
172
+ set -- -
173
+ fi
174
+
175
+ exec 3>&1
176
+
177
+ # res=1 means that no file matched yet
178
+ res=1
179
+
180
+ for i; do
181
+ case $i in
182
+ *[-.][zZ] | *_z | *[-.]gz | *.t[ag]z) uncompress="gzip -cdf";;
183
+ *[-.]bz2 | *[-.]tbz | *.tbz2) uncompress="bzip2 -cdf";;
184
+ *[-.]lzo | *[-.]tzo) uncompress="lzop -cdf";;
185
+ *[-.]zst | *[-.]tzst) uncompress="zstd -cdfq";; # zstd needs -q.
186
+ *[-.]lz4) uncompress="lz4 -cdf";;
187
+ *) uncompress="$xz -cdfqQ";; # -qQ to ignore warnings like unsupp. check.
188
+ esac
189
+ # xz_status will hold the decompressor's exit status.
190
+ # Exit status of grep (and in rare cases, printf or sed) is
191
+ # available as the exit status of this assignment command.
192
+ xz_status=$(
193
+ exec 5>&1
194
+ ($uncompress -- "$i" 5>&-; echo $? >&5) 3>&- |
195
+ if test $files_with_matches -eq 1; then
196
+ eval "$grep -q" && { printf '%s\n' "$i" || exit 2; }
197
+ elif test $files_without_matches -eq 1; then
198
+ eval "$grep -q" || {
199
+ r=$?
200
+ if test $r -eq 1; then
201
+ printf '%s\n' "$i" || r=2
202
+ fi
203
+ exit $r
204
+ }
205
+ elif test $with_filename -eq 0 &&
206
+ { test $# -eq 1 || test $no_filename -eq 1; }; then
207
+ eval "$grep"
208
+ elif test $grep_supports_label -eq 1; then
209
+ # The grep implementation in use allows us to specify the filename
210
+ # that grep will prefix to the output lines. This is faster and
211
+ # less prone to security bugs than the fallback method that uses sed.
212
+ # This also avoids confusing output with GNU grep >= 3.5 (2020-09-27)
213
+ # which prints "binary file matches" to stderr instead of stdout.
214
+ #
215
+ # If reading from stdin, let grep use whatever name it prefers for
216
+ # stdin. With GNU grep it is a locale-specific translated string.
217
+ if test "x$i" = "x-"; then
218
+ eval "$grep -H"
219
+ else
220
+ eval "$grep -H --label \"\$i\""
221
+ fi
222
+ else
223
+ # Append a colon so that the last character will never be a newline
224
+ # which would otherwise get lost in shell command substitution.
225
+ i="$i:"
226
+
227
+ # Escape & \ | and newlines only if such characters are present
228
+ # (speed optimization).
229
+ case $i in
230
+ (*'
231
+ '* | *'&'* | *'\'* | *'|'*)
232
+ # If sed fails, set i to a known safe string to ensure that
233
+ # failing sed did not create a half-escaped dangerous string.
234
+ i=$(printf '%s\n' "$i" | LC_ALL=C sed 's/[&\|]/\\&/g; $!s/$/\\/') ||
235
+ i='(unknown filename):';;
236
+ esac
237
+
238
+ # $i already ends with a colon so do not add it here.
239
+ sed_script="s|^|$i|"
240
+
241
+ # If grep or sed fails, pick the larger value of the two exit statuses.
242
+ # If sed fails, use at least 2 since we use >= 2 to indicate errors.
243
+ r=$(
244
+ exec 4>&1
245
+ (eval "$grep" 4>&-; echo $? >&4) 3>&- |
246
+ LC_ALL=C sed "$sed_script" >&3 4>&-
247
+ ) || {
248
+ sed_status=$?
249
+ test "$sed_status" -lt 2 && sed_status=2
250
+ test "$r" -lt "$sed_status" && r=$sed_status
251
+ }
252
+ exit $r
253
+ fi >&3 5>&-
254
+ )
255
+ r=$?
256
+
257
+ # If grep or sed or other non-decompression command failed with a signal,
258
+ # exit immediately and ignore the possible remaining files.
259
+ #
260
+ # NOTE: Instead of 128 + signal_number, some shells use
261
+ # 256 + signal_number (ksh) or 384 + signal_number (yash).
262
+ # This is fine for us since their "exit" and "kill -l" commands take
263
+ # this into account. (At least the versions I tried do but there is
264
+ # a report of an old ksh variant whose "exit" truncates the exit status
265
+ # to 8 bits without any special handling for values indicating a signal.)
266
+ test "$r" -ge 128 && exit "$r"
267
+
268
+ if test -z "$xz_status"; then
269
+ # Something unusual happened, for example, we got a signal and
270
+ # the exit status of the decompressor was never echoed and thus
271
+ # $xz_status is empty. Exit immediately and ignore the possible
272
+ # remaining files.
273
+ exit 2
274
+ elif test "$xz_status" -ge 128; then
275
+ # The decompressor died due to a signal. SIGPIPE is ignored since it can
276
+ # occur if grep exits before the whole file has been decompressed (grep -q
277
+ # can do that). If the decompressor died with some other signal, exit
278
+ # immediately and ignore the possible remaining files.
279
+ test "$(kill -l "$xz_status" 2> /dev/null)" != "PIPE" && exit "$xz_status"
280
+ elif test "$xz_status" -gt 0; then
281
+ # Decompression failed but we will continue with the remaining
282
+ # files anyway. Set exit status to at least 2 to indicate an error.
283
+ test "$r" -lt 2 && r=2
284
+ fi
285
+
286
+ # Since res=1 is the initial value, we only need to care about
287
+ # matches (r == 0) and errors (r >= 2) here; r == 1 can be ignored.
288
+ if test "$r" -ge 2; then
289
+ # An error occurred in decompressor, grep, or some other command. Update
290
+ # res unless a larger error code has been seen with an earlier file.
291
+ test "$res" -lt "$r" && res=$r
292
+ elif test "$r" -eq 0; then
293
+ # grep found a match and no errors occurred. Update res if no errors have
294
+ # occurred with earlier files.
295
+ test "$res" -eq 1 && res=0
296
+ fi
297
+ done
298
+
299
+ # 0: At least one file matched and no errors occurred.
300
+ # 1: No matches were found and no errors occurred.
301
+ # >=2: Error. It's unknown if matches were found.
302
+ exit "$res"
bin/lzgrep ADDED
@@ -0,0 +1,302 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/sh
2
+ # SPDX-License-Identifier: GPL-2.0-or-later
3
+
4
+ # xzgrep -- a wrapper around a grep program that decompresses files as needed
5
+ # Adapted from a version sent by Charles Levert <charles@comm.polymtl.ca>
6
+
7
+ # Copyright (C) 1998, 2001, 2002, 2006, 2007 Free Software Foundation
8
+ # Copyright (C) 1993 Jean-loup Gailly
9
+
10
+ # Modified for XZ Utils by Andrew Dudman and Lasse Collin.
11
+
12
+ # This program is free software; you can redistribute it and/or modify
13
+ # it under the terms of the GNU General Public License as published by
14
+ # the Free Software Foundation; either version 2 of the License, or
15
+ # (at your option) any later version.
16
+
17
+ # This program is distributed in the hope that it will be useful,
18
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
19
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
+ # GNU General Public License for more details.
21
+
22
+ # shellcheck shell=sh disable=SC1003,SC2016
23
+
24
+
25
+ #SET_PATH - This line is a placeholder to ease patching this script.
26
+
27
+ # Instead of unsetting XZ_OPT, just make sure that xz will use file format
28
+ # autodetection. This way memory usage limit and thread limit can be
29
+ # specified via XZ_OPT. With gzip, bzip2, and lzop it's OK to just unset the
30
+ # environment variables.
31
+ xz='xz --format=auto'
32
+ unset GZIP BZIP BZIP2 LZOP
33
+
34
+ case ${0##*/} in
35
+ *egrep*) prog=xzegrep; grep=${GREP:-grep -E};;
36
+ *fgrep*) prog=xzfgrep; grep=${GREP:-grep -F};;
37
+ *) prog=xzgrep; grep=${GREP:-grep};;
38
+ esac
39
+
40
+ version="$prog (XZ Utils) 5.8.2"
41
+
42
+ usage="Usage: ${0##*/} [OPTION]... [-e] PATTERN [FILE]...
43
+ Look for instances of PATTERN in the input FILEs, using their
44
+ uncompressed contents if they are compressed.
45
+
46
+ OPTIONs are the same as for '$grep'.
47
+
48
+ Report bugs to <xz@tukaani.org>."
49
+
50
+ # sed script to escape all ' for the shell, and then (to handle trailing
51
+ # newlines correctly) turn trailing X on last line into '.
52
+ escape='
53
+ s/'\''/'\''\\'\'''\''/g
54
+ $s/X$/'\''/
55
+ '
56
+ operands=
57
+ have_pat=0
58
+ files_with_matches=0
59
+ files_without_matches=0
60
+ no_filename=0
61
+ with_filename=0
62
+
63
+ # See if -H and --label options are supported (GNU and *BSDs).
64
+ if test f:x = "$(eval "echo x | $grep -H --label=f x 2> /dev/null")"; then
65
+ grep_supports_label=1
66
+ else
67
+ grep_supports_label=0
68
+ fi
69
+
70
+ while test $# -ne 0; do
71
+ option=$1
72
+ shift
73
+ optarg=
74
+
75
+ case $option in
76
+ (-[0123456789abcdEFGhHiIKlLnoPqrRsTuUvVwxyzZ]*[!0123456789]*)
77
+ # Something like -Fiv was specified, that is, $option contains more
78
+ # than one option of which the first option (in this example -F)
79
+ # doesn't take an argument. Split the first option into a standalone
80
+ # argument and continue parsing the rest of the options (in this example,
81
+ # replace -Fiv with -iv in the argument list and set option=-F).
82
+ #
83
+ # If there are digits [0-9] they are treated as if they were a single
84
+ # option character because this syntax is an alias for -C for GNU grep.
85
+ # For example, "grep -25F" is equivalent to "grep -C25 -F". If only
86
+ # digits are specified like "grep -25" we don't get here because the
87
+ # above pattern in the case-statement doesn't match such strings.
88
+ arg2=-\'$(LC_ALL=C expr "X${option}X" : 'X-.[0-9]*\(.*\)' |
89
+ LC_ALL=C sed "$escape")
90
+ eval "set -- $arg2 "'${1+"$@"}'
91
+ option=$(LC_ALL=C expr "X$option" : 'X\(-.[0-9]*\)');;
92
+ (--binary-*=* | --[lm]a*=* | --reg*=*)
93
+ # These options require an argument and an argument has been provided
94
+ # with the --foo=argument syntax. All is good.
95
+ ;;
96
+ (-[ABCDefmX] | --binary-* | --file | --[lm]a* | --reg*)
97
+ # These options require an argument which should now be in $1.
98
+ # If it isn't, display an error and exit.
99
+ case ${1?"$option option requires an argument"} in
100
+ (*\'*)
101
+ optarg=" '"$(printf '%sX\n' "$1" | LC_ALL=C sed "$escape");;
102
+ (*)
103
+ optarg=" '$1'";;
104
+ esac
105
+ shift;;
106
+ (--)
107
+ break;;
108
+ (-?*)
109
+ ;;
110
+ (*)
111
+ case $option in
112
+ (*\'*)
113
+ operands="$operands '"$(printf '%sX\n' "$option" |
114
+ LC_ALL=C sed "$escape");;
115
+ (*)
116
+ operands="$operands '$option'";;
117
+ esac
118
+ ${POSIXLY_CORRECT+break}
119
+ continue;;
120
+ esac
121
+
122
+ case $option in
123
+ (-[drRzZ] | --di* | --exc* | --inc* | --rec* | --nu*)
124
+ printf >&2 '%s: %s: Option not supported\n' "$0" "$option"
125
+ exit 2;;
126
+ (-[ef]* | --file | --file=* | --reg*)
127
+ have_pat=1;;
128
+ (--h | --he | --hel | --help)
129
+ printf '%s\n' "$usage" || exit 2
130
+ exit;;
131
+ (-H | --wi | --wit | --with | --with- | --with-f | --with-fi \
132
+ | --with-fil | --with-file | --with-filen | --with-filena | --with-filenam \
133
+ | --with-filename)
134
+ with_filename=1
135
+ continue;;
136
+ (-l | --files-with-*)
137
+ files_with_matches=1
138
+ continue;;
139
+ (-L | --files-witho*)
140
+ files_without_matches=1
141
+ continue;;
142
+ (-h | --no-f*)
143
+ no_filename=1;;
144
+ (-V | --v | --ve | --ver | --vers | --versi | --versio | --version)
145
+ printf '%s\n' "$version" || exit 2
146
+ exit;;
147
+ esac
148
+
149
+ case $option in
150
+ (*\'?*)
151
+ option=\'$(printf '%sX\n' "$option" | LC_ALL=C sed "$escape");;
152
+ (*)
153
+ option="'$option'";;
154
+ esac
155
+
156
+ grep="$grep $option$optarg"
157
+ done
158
+
159
+ eval "set -- $operands "'${1+"$@"}'
160
+
161
+ if test $have_pat -eq 0; then
162
+ case ${1?"Missing pattern; try '${0##*/} --help' for help"} in
163
+ (*\'*)
164
+ grep="$grep -e '"$(printf '%sX\n' "$1" | LC_ALL=C sed "$escape");;
165
+ (*)
166
+ grep="$grep -e '$1'";;
167
+ esac
168
+ shift
169
+ fi
170
+
171
+ if test $# -eq 0; then
172
+ set -- -
173
+ fi
174
+
175
+ exec 3>&1
176
+
177
+ # res=1 means that no file matched yet
178
+ res=1
179
+
180
+ for i; do
181
+ case $i in
182
+ *[-.][zZ] | *_z | *[-.]gz | *.t[ag]z) uncompress="gzip -cdf";;
183
+ *[-.]bz2 | *[-.]tbz | *.tbz2) uncompress="bzip2 -cdf";;
184
+ *[-.]lzo | *[-.]tzo) uncompress="lzop -cdf";;
185
+ *[-.]zst | *[-.]tzst) uncompress="zstd -cdfq";; # zstd needs -q.
186
+ *[-.]lz4) uncompress="lz4 -cdf";;
187
+ *) uncompress="$xz -cdfqQ";; # -qQ to ignore warnings like unsupp. check.
188
+ esac
189
+ # xz_status will hold the decompressor's exit status.
190
+ # Exit status of grep (and in rare cases, printf or sed) is
191
+ # available as the exit status of this assignment command.
192
+ xz_status=$(
193
+ exec 5>&1
194
+ ($uncompress -- "$i" 5>&-; echo $? >&5) 3>&- |
195
+ if test $files_with_matches -eq 1; then
196
+ eval "$grep -q" && { printf '%s\n' "$i" || exit 2; }
197
+ elif test $files_without_matches -eq 1; then
198
+ eval "$grep -q" || {
199
+ r=$?
200
+ if test $r -eq 1; then
201
+ printf '%s\n' "$i" || r=2
202
+ fi
203
+ exit $r
204
+ }
205
+ elif test $with_filename -eq 0 &&
206
+ { test $# -eq 1 || test $no_filename -eq 1; }; then
207
+ eval "$grep"
208
+ elif test $grep_supports_label -eq 1; then
209
+ # The grep implementation in use allows us to specify the filename
210
+ # that grep will prefix to the output lines. This is faster and
211
+ # less prone to security bugs than the fallback method that uses sed.
212
+ # This also avoids confusing output with GNU grep >= 3.5 (2020-09-27)
213
+ # which prints "binary file matches" to stderr instead of stdout.
214
+ #
215
+ # If reading from stdin, let grep use whatever name it prefers for
216
+ # stdin. With GNU grep it is a locale-specific translated string.
217
+ if test "x$i" = "x-"; then
218
+ eval "$grep -H"
219
+ else
220
+ eval "$grep -H --label \"\$i\""
221
+ fi
222
+ else
223
+ # Append a colon so that the last character will never be a newline
224
+ # which would otherwise get lost in shell command substitution.
225
+ i="$i:"
226
+
227
+ # Escape & \ | and newlines only if such characters are present
228
+ # (speed optimization).
229
+ case $i in
230
+ (*'
231
+ '* | *'&'* | *'\'* | *'|'*)
232
+ # If sed fails, set i to a known safe string to ensure that
233
+ # failing sed did not create a half-escaped dangerous string.
234
+ i=$(printf '%s\n' "$i" | LC_ALL=C sed 's/[&\|]/\\&/g; $!s/$/\\/') ||
235
+ i='(unknown filename):';;
236
+ esac
237
+
238
+ # $i already ends with a colon so do not add it here.
239
+ sed_script="s|^|$i|"
240
+
241
+ # If grep or sed fails, pick the larger value of the two exit statuses.
242
+ # If sed fails, use at least 2 since we use >= 2 to indicate errors.
243
+ r=$(
244
+ exec 4>&1
245
+ (eval "$grep" 4>&-; echo $? >&4) 3>&- |
246
+ LC_ALL=C sed "$sed_script" >&3 4>&-
247
+ ) || {
248
+ sed_status=$?
249
+ test "$sed_status" -lt 2 && sed_status=2
250
+ test "$r" -lt "$sed_status" && r=$sed_status
251
+ }
252
+ exit $r
253
+ fi >&3 5>&-
254
+ )
255
+ r=$?
256
+
257
+ # If grep or sed or other non-decompression command failed with a signal,
258
+ # exit immediately and ignore the possible remaining files.
259
+ #
260
+ # NOTE: Instead of 128 + signal_number, some shells use
261
+ # 256 + signal_number (ksh) or 384 + signal_number (yash).
262
+ # This is fine for us since their "exit" and "kill -l" commands take
263
+ # this into account. (At least the versions I tried do but there is
264
+ # a report of an old ksh variant whose "exit" truncates the exit status
265
+ # to 8 bits without any special handling for values indicating a signal.)
266
+ test "$r" -ge 128 && exit "$r"
267
+
268
+ if test -z "$xz_status"; then
269
+ # Something unusual happened, for example, we got a signal and
270
+ # the exit status of the decompressor was never echoed and thus
271
+ # $xz_status is empty. Exit immediately and ignore the possible
272
+ # remaining files.
273
+ exit 2
274
+ elif test "$xz_status" -ge 128; then
275
+ # The decompressor died due to a signal. SIGPIPE is ignored since it can
276
+ # occur if grep exits before the whole file has been decompressed (grep -q
277
+ # can do that). If the decompressor died with some other signal, exit
278
+ # immediately and ignore the possible remaining files.
279
+ test "$(kill -l "$xz_status" 2> /dev/null)" != "PIPE" && exit "$xz_status"
280
+ elif test "$xz_status" -gt 0; then
281
+ # Decompression failed but we will continue with the remaining
282
+ # files anyway. Set exit status to at least 2 to indicate an error.
283
+ test "$r" -lt 2 && r=2
284
+ fi
285
+
286
+ # Since res=1 is the initial value, we only need to care about
287
+ # matches (r == 0) and errors (r >= 2) here; r == 1 can be ignored.
288
+ if test "$r" -ge 2; then
289
+ # An error occurred in decompressor, grep, or some other command. Update
290
+ # res unless a larger error code has been seen with an earlier file.
291
+ test "$res" -lt "$r" && res=$r
292
+ elif test "$r" -eq 0; then
293
+ # grep found a match and no errors occurred. Update res if no errors have
294
+ # occurred with earlier files.
295
+ test "$res" -eq 1 && res=0
296
+ fi
297
+ done
298
+
299
+ # 0: At least one file matched and no errors occurred.
300
+ # 1: No matches were found and no errors occurred.
301
+ # >=2: Error. It's unknown if matches were found.
302
+ exit "$res"
bin/lzless ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/sh
2
+ # SPDX-License-Identifier: GPL-2.0-or-later
3
+
4
+ # Copyright (C) 1998, 2002, 2006, 2007 Free Software Foundation
5
+
6
+ # The original version for gzip was written by Paul Eggert.
7
+ # Modified for XZ Utils by Andrew Dudman and Lasse Collin.
8
+
9
+ # This program is free software; you can redistribute it and/or modify
10
+ # it under the terms of the GNU General Public License as published by
11
+ # the Free Software Foundation; either version 2 of the License, or
12
+ # (at your option) any later version.
13
+
14
+ # This program is distributed in the hope that it will be useful,
15
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
16
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
+ # GNU General Public License for more details.
18
+
19
+ # shellcheck shell=sh disable=SC2089,SC2090
20
+
21
+
22
+ #SET_PATH - This line is a placeholder to ease patching this script.
23
+
24
+ # Instead of unsetting XZ_OPT, just make sure that xz will use file format
25
+ # autodetection. This way memory usage limit and thread limit can be
26
+ # specified via XZ_OPT.
27
+ xz='xz --format=auto'
28
+
29
+ version='xzless (XZ Utils) 5.8.2'
30
+
31
+ usage="Usage: ${0##*/} [OPTION]... [FILE]...
32
+ Like 'less', but operate on the uncompressed contents of xz compressed FILEs.
33
+
34
+ Options are the same as for 'less'.
35
+
36
+ Report bugs to <xz@tukaani.org>."
37
+
38
+ case $1 in
39
+ --help) printf '%s\n' "$usage" || exit 2; exit;;
40
+ --version) printf '%s\n' "$version" || exit 2; exit;;
41
+ esac
42
+
43
+ if test "${LESSMETACHARS+set}" != set; then
44
+ # Work around a bug in less 394 and earlier;
45
+ # it mishandles the metacharacters '$%=~'.
46
+ space=' '
47
+ tab=' '
48
+ nl='
49
+ '
50
+ LESSMETACHARS="$space$tab$nl'"';*?"()<>[|&^`#\$%=~'
51
+ fi
52
+
53
+ VER=$(less -V | { read _ ver _ && echo ${ver%%.*}; })
54
+ if test "$VER" -ge 451; then
55
+ # less 451 or later: If the compressed file is valid but has
56
+ # zero bytes of uncompressed data, using two vertical bars ||- makes
57
+ # "less" check the exit status of xz and if it is zero then display
58
+ # an empty file. With a single vertical bar |- and no output from xz,
59
+ # "less" would attempt to display the raw input file instead.
60
+ LESSOPEN="||-$xz -cdfqQ -- %s"
61
+ elif test "$VER" -ge 429; then
62
+ # less 429 or later: LESSOPEN pipe will be used on
63
+ # standard input if $LESSOPEN begins with |-.
64
+ LESSOPEN="|-$xz -cdfqQ -- %s"
65
+ else
66
+ LESSOPEN="|$xz -cdfqQ -- %s"
67
+ fi
68
+
69
+ SHOW_PREPROC_ERRORS=
70
+ if test "$VER" -ge 632; then
71
+ SHOW_PREPROC_ERRORS=--show-preproc-errors
72
+ fi
73
+
74
+ export LESSMETACHARS LESSOPEN
75
+
76
+ exec less $SHOW_PREPROC_ERRORS "$@"
bin/lzmadec ADDED
Binary file (23.2 kB). View file
 
bin/lzmainfo ADDED
Binary file (23.5 kB). View file
 
bin/lzmore ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/sh
2
+ # SPDX-License-Identifier: GPL-2.0-or-later
3
+
4
+ # Copyright (C) 2001, 2002, 2007 Free Software Foundation
5
+ # Copyright (C) 1992, 1993 Jean-loup Gailly
6
+
7
+ # Modified for XZ Utils by Andrew Dudman and Lasse Collin.
8
+
9
+ # This program is free software; you can redistribute it and/or modify
10
+ # it under the terms of the GNU General Public License as published by
11
+ # the Free Software Foundation; either version 2 of the License, or
12
+ # (at your option) any later version.
13
+
14
+ # This program is distributed in the hope that it will be useful,
15
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
16
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
+ # GNU General Public License for more details.
18
+
19
+ # shellcheck shell=sh
20
+
21
+
22
+ #SET_PATH - This line is a placeholder to ease patching this script.
23
+
24
+ # Instead of unsetting XZ_OPT, just make sure that xz will use file format
25
+ # autodetection. This way memory usage limit and thread limit can be
26
+ # specified via XZ_OPT.
27
+ xz='xz --format=auto'
28
+
29
+ version='xzmore (XZ Utils) 5.8.2'
30
+
31
+ usage="Usage: ${0##*/} [OPTION]... [FILE]...
32
+ Like 'more', but operate on the uncompressed contents of xz compressed FILEs.
33
+
34
+ Report bugs to <xz@tukaani.org>."
35
+
36
+ case $1 in
37
+ --help) printf '%s\n' "$usage" || exit 2; exit;;
38
+ --version) printf '%s\n' "$version" || exit 2; exit;;
39
+ esac
40
+
41
+ oldtty=`stty -g 2>/dev/null`
42
+ if stty -cbreak 2>/dev/null; then
43
+ cb='cbreak'; ncb='-cbreak'
44
+ else
45
+ # 'stty min 1' resets eof to ^a on both SunOS and SysV!
46
+ cb='min 1 -icanon'; ncb='icanon eof ^d'
47
+ fi
48
+ if test $? -eq 0 && test -n "$oldtty"; then
49
+ trap 'stty $oldtty 2>/dev/null; exit' 0 2 3 5 10 13 15
50
+ else
51
+ trap 'stty $ncb echo 2>/dev/null; exit' 0 2 3 5 10 13 15
52
+ fi
53
+
54
+ if test $# = 0; then
55
+ if test -t 0; then
56
+ printf '%s\n' "$usage"; exit 1
57
+ else
58
+ $xz -cdfqQ | eval "${PAGER:-more}"
59
+ fi
60
+ else
61
+ FIRST=1
62
+ for FILE; do
63
+ true < "$FILE" || continue
64
+ if test $FIRST -eq 0; then
65
+ printf "%s--More--(Next file: %s)" "" "$FILE"
66
+ stty $cb -echo 2>/dev/null
67
+ ANS=`dd bs=1 count=1 2>/dev/null`
68
+ stty $ncb echo 2>/dev/null
69
+ echo " "
70
+ case "$ANS" in
71
+ [eq]) exit;;
72
+ esac
73
+ fi
74
+ if test "$ANS" != 's'; then
75
+ printf '%s\n' "------> $FILE <------"
76
+ $xz -cdfqQ -- "$FILE" | eval "${PAGER:-more}"
77
+ fi
78
+ if test -t 1; then
79
+ FIRST=0
80
+ fi
81
+ done
82
+ fi
bin/markdown-it ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ #!/usr/local/miniconda3/envs/phantom/bin/python3.11
2
+ import sys
3
+ from markdown_it.cli.parse import main
4
+ if __name__ == '__main__':
5
+ sys.argv[0] = sys.argv[0].removesuffix('.exe')
6
+ sys.exit(main())
bin/ncursesw6-config ADDED
@@ -0,0 +1,331 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/sh
2
+ # $Id: ncurses-config.in,v 1.52 2022/07/26 21:36:28 tom Exp $
3
+ ##############################################################################
4
+ # Copyright 2018-2021,2022 Thomas E. Dickey #
5
+ # Copyright 2006-2015,2017 Free Software Foundation, Inc. #
6
+ # #
7
+ # Permission is hereby granted, free of charge, to any person obtaining a #
8
+ # copy of this software and associated documentation files (the "Software"), #
9
+ # to deal in the Software without restriction, including without limitation #
10
+ # the rights to use, copy, modify, merge, publish, distribute, distribute #
11
+ # with modifications, sublicense, and/or sell copies of the Software, and to #
12
+ # permit persons to whom the Software is furnished to do so, subject to the #
13
+ # following conditions: #
14
+ # #
15
+ # The above copyright notice and this permission notice shall be included in #
16
+ # all copies or substantial portions of the Software. #
17
+ # #
18
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
19
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
20
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL #
21
+ # THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
22
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING #
23
+ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER #
24
+ # DEALINGS IN THE SOFTWARE. #
25
+ # #
26
+ # Except as contained in this notice, the name(s) of the above copyright #
27
+ # holders shall not be used in advertising or otherwise to promote the sale, #
28
+ # use or other dealings in this Software without prior written #
29
+ # authorization. #
30
+ ##############################################################################
31
+ #
32
+ # Author: Thomas E. Dickey, 2006-on
33
+
34
+ LANG=C; export LANG
35
+ LANGUAGE=C; export LANGUAGE
36
+ LC_ALL=C; export LC_ALL
37
+ LC_CTYPE=C; export LC_CTYPE
38
+
39
+ prefix="/usr/local/miniconda3/envs/phantom"
40
+ exec_prefix="${prefix}"
41
+
42
+ bindir="${exec_prefix}/bin"
43
+ includedir="${prefix}/include"
44
+ libdir="${exec_prefix}/lib"
45
+ datarootdir="${prefix}/share"
46
+ datadir="${datarootdir}"
47
+ mandir="${datarootdir}/man"
48
+
49
+ THIS="ncursesw"
50
+ TINFO_LIB="tinfow"
51
+ RPATH_LIST="${libdir}"
52
+
53
+ includesubdir="${prefix}/include/${THIS}"
54
+
55
+ # Ensure that RPATH_LIST contains only absolute pathnames, if it is nonempty.
56
+ # We cannot filter it out within the build-process since the variable is used
57
+ # in some special cases of installation using a relative path.
58
+ if [ -n "$RPATH_LIST" ]
59
+ then
60
+ save_IFS="$IFS"
61
+ IFS=':'
62
+ filtered=
63
+ for item in $RPATH_LIST
64
+ do
65
+ case "$item" in
66
+ ./*|../*|*/..|*/../*)
67
+ ;;
68
+ *)
69
+ [ -n "$filtered" ] && filtered="${filtered}:"
70
+ filtered="${filtered}${item}"
71
+ ;;
72
+ esac
73
+ done
74
+ IFS="$save_IFS"
75
+ # if the result is empty, there is little we can do to fix it
76
+ RPATH_LIST="$filtered"
77
+ fi
78
+
79
+ # with --disable-overwrite, we installed into a subdirectory, but transformed
80
+ # the headers to include like this:
81
+ # <ncursesw/curses.h>
82
+ if [ xno = xno ]; then
83
+ case $includedir in
84
+ $prefix/include/ncursesw)
85
+ includedir=`echo "$includedir" | sed -e 's,/[^/]*$,,'`
86
+ ;;
87
+ esac
88
+ fi
89
+
90
+ LIBS=""
91
+ if [ "tinfo" = "ncurses" ]; then
92
+ LIBS="-l${THIS} $LIBS"
93
+ else
94
+ LIBS="-l${THIS} -l${TINFO_LIB} $LIBS"
95
+ fi
96
+
97
+ # Ignore -L options which do not correspond to an actual directory, or which
98
+ # are standard library directories (i.e., the linker is supposed to search
99
+ # those directories).
100
+ #
101
+ # There is no portable way to find the list of standard library directories.
102
+ # Require a POSIX shell anyway, to keep this simple.
103
+ lib_flags=
104
+ for opt in -L$libdir -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,-rpath,/usr/local/miniconda3/envs/phantom/lib -Wl,-rpath-link,/usr/local/miniconda3/envs/phantom/lib -L/usr/local/miniconda3/envs/phantom/lib $LIBS
105
+ do
106
+ case $opt in
107
+ -specs*) # ignore linker specs-files which were used to build library
108
+ continue
109
+ ;;
110
+ -Wl,-z,*) # ignore flags used to manipulate shared image
111
+ continue
112
+ ;;
113
+ -Wl,--dynamic-linker*) # ignore ELF interpreter
114
+ continue
115
+ ;;
116
+ -Wl,--as-needed|-Wl,--build-id=*|-Wl,-dT,*|-Wl,-T,*)
117
+ continue
118
+ ;;
119
+ -L*)
120
+ lib_check=`echo "x$opt" | sed -e 's/^.-L//'`
121
+ [ -d "$lib_check" ] || continue
122
+ case "$lib_check" in
123
+ /usr/local/lib64|/lib64|/usr/lib64|/usr/local/lib|/lib|/usr/lib) # skip standard libdir
124
+ if [ "$lib_check" = "$libdir" ]
125
+ then
126
+ lib_first=yes
127
+ IFS_save="$IFS"
128
+ IFS='|'
129
+ LIBDIRS="/usr/local/lib64|/lib64|/usr/lib64|/usr/local/lib|/lib|/usr/lib"
130
+ for lib_check in $LIBDIRS
131
+ do
132
+ if [ -d "$lib_check" ]
133
+ then
134
+ if [ "$lib_check" != "$libdir" ]
135
+ then
136
+ lib_first=no
137
+ fi
138
+ break
139
+ fi
140
+ done
141
+ IFS="$IFS_save"
142
+ [ $lib_first = yes ] && continue
143
+ found=no
144
+ for check in $lib_flags
145
+ do
146
+ if [ "x$check" = "x$opt" ]
147
+ then
148
+ found=yes
149
+ break
150
+ fi
151
+ done
152
+ [ $found = yes ] && continue
153
+ :
154
+ else
155
+ continue
156
+ fi
157
+ ;;
158
+ *)
159
+ found=no
160
+ for check in $lib_flags
161
+ do
162
+ if [ "x$check" = "x$opt" ]
163
+ then
164
+ found=yes
165
+ break
166
+ fi
167
+ done
168
+ [ $found = yes ] && continue
169
+ ;;
170
+ esac
171
+ ;;
172
+ esac
173
+ lib_flags="$lib_flags $opt"
174
+ done
175
+
176
+ [ $# = 0 ] && exec /bin/sh "$0" --error
177
+
178
+ while [ $# -gt 0 ]; do
179
+ case "$1" in
180
+ # basic configuration
181
+ --prefix)
182
+ echo "$prefix"
183
+ ;;
184
+ --exec-prefix)
185
+ echo "$exec_prefix"
186
+ ;;
187
+ # compile/link
188
+ --cflags)
189
+ INCS=" -D_GNU_SOURCE -DNCURSES_WIDECHAR"
190
+ if [ "xno" = xno ]; then
191
+ INCS="$INCS -I${includesubdir}"
192
+ fi
193
+ if [ "${includedir}" != /usr/include ]; then
194
+ INCS="$INCS -I${includedir}"
195
+ fi
196
+ sed -e 's,^[ ]*,,' -e 's, [ ]*, ,g' -e 's,[ ]*$,,' <<-ENDECHO
197
+ $INCS
198
+ ENDECHO
199
+ ;;
200
+ --libs)
201
+ OPTS=
202
+ for opt in $lib_flags
203
+ do
204
+ [ -n "$OPTS" ] && OPTS="$OPTS "
205
+ OPTS="${OPTS}${opt}"
206
+ done
207
+ printf '%s\n' "$OPTS"
208
+ ;;
209
+ --libs-only-L)
210
+ OPTS=
211
+ for opt in $lib_flags
212
+ do
213
+ case "x$opt" in
214
+ x-L*)
215
+ [ -n "$OPTS" ] && OPTS="$OPTS "
216
+ OPTS="${OPTS}${opt}"
217
+ ;;
218
+ esac
219
+ done
220
+ printf '%s\n' "$OPTS"
221
+ ;;
222
+ --libs-only-l)
223
+ OPTS=
224
+ for opt in $lib_flags
225
+ do
226
+ case "x$opt" in
227
+ x-l*)
228
+ [ -n "$OPTS" ] && OPTS="$OPTS "
229
+ OPTS="${OPTS}${opt}"
230
+ ;;
231
+ esac
232
+ done
233
+ printf '%s\n' "$OPTS"
234
+ ;;
235
+ --libs-only-other)
236
+ OPTS=
237
+ for opt in $lib_flags
238
+ do
239
+ case "x$opt" in
240
+ x-[lL]*)
241
+ ;;
242
+ *)
243
+ [ -n "$OPTS" ] && OPTS="$OPTS "
244
+ OPTS="${OPTS}${opt}"
245
+ ;;
246
+ esac
247
+ done
248
+ printf '%s\n' "$OPTS"
249
+ ;;
250
+ # identification
251
+ --version)
252
+ echo "6.5.20240427"
253
+ ;;
254
+ --abi-version)
255
+ echo "6"
256
+ ;;
257
+ --mouse-version)
258
+ echo "2"
259
+ ;;
260
+ # locations
261
+ --bindir)
262
+ echo "${bindir}"
263
+ ;;
264
+ --datadir)
265
+ echo "${datadir}"
266
+ ;;
267
+ --includedir)
268
+ INCS=
269
+ if [ "xno" = xno ]; then
270
+ INCS="${includesubdir}"
271
+ elif [ "${includedir}" != /usr/include ]; then
272
+ INCS="${includedir}"
273
+ fi
274
+ echo "$INCS"
275
+ ;;
276
+ --libdir)
277
+ echo "${libdir}"
278
+ ;;
279
+ --mandir)
280
+ echo "${mandir}"
281
+ ;;
282
+ --terminfo)
283
+ echo "/usr/local/miniconda3/envs/phantom/share/terminfo"
284
+ ;;
285
+ --terminfo-dirs)
286
+ echo "/usr/local/miniconda3/envs/phantom/share/terminfo"
287
+ ;;
288
+ --termpath)
289
+ echo "/etc/termcap:/usr/share/misc/termcap"
290
+ ;;
291
+ # general info
292
+ --help)
293
+ cat <<ENDHELP
294
+ Usage: `basename "$0"` [options]
295
+
296
+ Options:
297
+ --prefix echos the package-prefix of ${THIS}
298
+ --exec-prefix echos the executable-prefix of ${THIS}
299
+
300
+ --cflags echos the C compiler flags needed to compile with ${THIS}
301
+ --libs echos the libraries needed to link with ${THIS}
302
+
303
+ --libs-only-L echos -L linker options (search path) for ${THIS}
304
+ --libs-only-l echos -l linker options (libraries) for ${THIS}
305
+ --libs-only-other echos linker options other than -L/-l
306
+
307
+ --version echos the release+patchdate version of ${THIS}
308
+ --abi-version echos the ABI version of ${THIS}
309
+ --mouse-version echos the mouse-interface version of ${THIS}
310
+
311
+ --bindir echos the directory containing ${THIS} programs
312
+ --datadir echos the directory containing ${THIS} data
313
+ --includedir echos the directory containing ${THIS} header files
314
+ --libdir echos the directory containing ${THIS} libraries
315
+ --mandir echos the directory containing ${THIS} manpages
316
+ --terminfo echos the \$TERMINFO terminfo database path
317
+ --terminfo-dirs echos the \$TERMINFO_DIRS directory list
318
+ --termpath echos the \$TERMPATH termcap list
319
+
320
+ --help prints this message
321
+ ENDHELP
322
+ ;;
323
+ --error|*)
324
+ /bin/sh "$0" --help 1>&2
325
+ exit 1
326
+ ;;
327
+ esac
328
+ shift
329
+ done
330
+ # vi:ts=4 sw=4
331
+ # vile:shmode
bin/normalizer ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ #!/usr/local/miniconda3/envs/phantom/bin/python3.11
2
+ import sys
3
+ from charset_normalizer.cli import cli_detect
4
+ if __name__ == '__main__':
5
+ sys.argv[0] = sys.argv[0].removesuffix('.exe')
6
+ sys.exit(cli_detect())
bin/pip ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/local/miniconda3/envs/phantom/bin/python3.11
2
+ # -*- coding: utf-8 -*-
3
+ import re
4
+ import sys
5
+
6
+ from pip._internal.cli.main import main
7
+
8
+ if __name__ == '__main__':
9
+ sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
10
+ sys.exit(main())
bin/pip3 ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/local/miniconda3/envs/phantom/bin/python3.11
2
+ # -*- coding: utf-8 -*-
3
+ import re
4
+ import sys
5
+
6
+ from pip._internal.cli.main import main
7
+
8
+ if __name__ == '__main__':
9
+ sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
10
+ sys.exit(main())
bin/proton ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ #!/usr/local/miniconda3/envs/phantom/bin/python3.11
2
+ import sys
3
+ from triton.profiler.proton import main
4
+ if __name__ == '__main__':
5
+ sys.argv[0] = sys.argv[0].removesuffix('.exe')
6
+ sys.exit(main())
bin/proton-viewer ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ #!/usr/local/miniconda3/envs/phantom/bin/python3.11
2
+ import sys
3
+ from triton.profiler.viewer import main
4
+ if __name__ == '__main__':
5
+ sys.argv[0] = sys.argv[0].removesuffix('.exe')
6
+ sys.exit(main())
bin/pydoc ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ #!/usr/local/miniconda3/envs/phantom/bin/python3.11
2
+
3
+ import pydoc
4
+ if __name__ == '__main__':
5
+ pydoc.cli()