diff --git a/misc/mc.ext.in b/misc/mc.ext.in
index 493e8c5..bb5b4b7 100644
a
|
b
|
regex/\.a(rj|[0-9][0-9])$ |
154 | 154 | Open=%cd %p#uarj |
155 | 155 | View=%view{ascii} unarj l %f |
156 | 156 | |
| 157 | # cab |
| 158 | regex/\.([cC][aA][bB])$ |
| 159 | Open=%cd %p#ucab |
| 160 | View=%view{ascii} cabextract -l %f |
| 161 | |
157 | 162 | # ha |
158 | 163 | regex/\.([Hh][Aa])$ |
159 | 164 | Open=%cd %p#uha |
diff --git a/vfs/extfs/Makefile.am b/vfs/extfs/Makefile.am
index 48253f3..4d10507 100644
a
|
b
|
EXTFSCONFFILES = extfs.ini sfs.ini |
6 | 6 | EXTFS_MISC = README |
7 | 7 | |
8 | 8 | # Scripts hat don't need adaptation to the local system |
9 | | EXTFS_CONST = bpp rpm trpm srpm u7z |
| 9 | EXTFS_CONST = bpp rpm trpm srpm u7z ucab |
10 | 10 | |
11 | 11 | # Scripts that need adaptation to the local system - source files |
12 | 12 | EXTFS_IN = \ |
… |
… |
EXTFS_OUT = \ |
62 | 62 | uzip \ |
63 | 63 | uzoo |
64 | 64 | |
| 65 | |
65 | 66 | if USE_VFS |
66 | 67 | extfs_DATA = $(EXTFS_MISC) |
67 | 68 | extfs_SCRIPTS = $(EXTFS_CONST) $(EXTFS_OUT) |
diff --git a/vfs/extfs/extfs.ini b/vfs/extfs/extfs.ini
index bfc6e91..47dc69b 100644
a
|
b
|
uarj |
14 | 14 | uarc |
15 | 15 | uace |
16 | 16 | |
| 17 | # For cab files |
| 18 | ucab |
| 19 | |
17 | 20 | # ar is used for static libraries |
18 | 21 | uar |
19 | 22 | |
diff --git a/vfs/extfs/ucab b/vfs/extfs/ucab
new file mode 100644
index 0000000..e6bded3
-
|
+
|
|
| 1 | #! /bin/sh |
| 2 | |
| 3 | CAB=cabextract |
| 4 | |
| 5 | mccabfs_list () |
| 6 | { |
| 7 | $CAB -l "$1" | gawk -v uid=`id -un` -v gid=`id -gn` ' |
| 8 | BEGIN { flag=0 } |
| 9 | /^-------/ { flag++; if (flag > 1) exit 0; next } |
| 10 | { |
| 11 | if (flag == 0) next |
| 12 | if (length($6) == 0) next |
| 13 | pr="-rw-r--r--" |
| 14 | split($3, a, ".") |
| 15 | split($4, b, ":") |
| 16 | printf "%s 1 %s %s %d %02d/%02d/%02d %02d:%02d %s\n", pr, uid, gid, $1, a[2], a[1], a[3], b[1], b[2], $6 |
| 17 | }' |
| 18 | |
| 19 | } |
| 20 | |
| 21 | mccabfs_copyout () |
| 22 | { |
| 23 | $CAB -F "$2" -p "$1" > "$3" |
| 24 | } |
| 25 | |
| 26 | LC_ALL=C |
| 27 | export LC_ALL |
| 28 | |
| 29 | umask 077 |
| 30 | |
| 31 | cmd="$1" |
| 32 | |
| 33 | case "$cmd" in |
| 34 | # Workaround for a bug in mc - directories must precede files to |
| 35 | # avoid duplicate entries, so we sort output by filenames |
| 36 | list) mccabfs_list "$2" ;; |
| 37 | copyout) mccabfs_copyout "$2" "$3" "$4" ;; |
| 38 | *) exit 1 ;; |
| 39 | esac |
| 40 | exit 0 |