blob: 10b63493043c6bd4ae45b0ce7b951d6c412eab97 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
# This patch has been put into the public domain
# by Per Øyvind Karlsen <pkarlsen@mandriva.com>.
--- lesspipe.sh.old 2006-09-20 20:21:46.000000000 +0200
+++ lesspipe.sh 2007-05-04 00:10:43.000000000 +0200
@@ -180,6 +180,12 @@ get_cmd () {
set "$1" $tmp..
fi
+ #(peroyvind): magic bytes for lzma not okay yet, do check against file ending in stead
+ if [[ "$2" = *.lzma ]] ; then
+ cmd=(lzma -cd "$2")
+ return
+ fi
+
if [[ "$1" = *bzip*compress* || "$1" = *compress[\'e]d\ * || "$1" = *packed\ data* ]]; then
if [[ "$3" = $sep$sep ]]; then
return
--- lesspipe.sh.in.lzma 2007-06-07 16:14:38.000000000 +0200
+++ lesspipe.sh.in 2007-06-07 16:14:40.000000000 +0200
@@ -183,6 +183,12 @@ get_cmd () {
set "$1" $tmp..
fi
+ #(peroyvind): magic bytes for lzma not okay yet, do check against file ending in stead
+ if [[ "$2" = *.lzma ]] ; then
+ cmd=(lzma -cd "$2")
+ return
+ fi
+
if [[ "$1" = *bzip*compress* || "$1" = *compress[\'e]d\ * || "$1" = *packed\ data* ]]; then
if [[ "$3" = $sep$sep ]]; then
return
|