[PATCH] add 'ualz' to MC extfs.



Hello,

I added 'ualz' extfs script.
I tested this patch with unalz-0.50.

You can get unalz:
    wget http://www.kipple.pe.kr/win/unalz/unalz-0.50.tgz

Below is the description of Debian unalz package:
    The utility used for decompressing alzip format file. unalz
    tool is the utility used for decompressing alzip format file.
    It mainly operates on files with names ending in '.alz'.

Regards,
namsh
diff -u ./ualz.orig ./ualz
--- ./ualz.orig	2005-07-14 18:20:04.000000000 +0900
+++ ./ualz	2005-07-14 19:30:13.000000000 +0900
@@ -0,0 +1,45 @@
+#! /bin/sh
+#
+# extfs support for alzip.
+# Written by SungHyun Nam <goweol gmail com>
+# Based on u7z and uha.
+# Licensed under GNU GPL version 2 or later version.
+
+UNALZ=unalz
+
+mcualz_list ()
+{
+    ugid="`id -nu` `id -ng`"
+    date_re='^\(....\).\(..\).\(..\) \(..:..:..\)'
+    date_mc='\2-\3-\1 \4'
+    size_re='............'
+    $UNALZ -l "$1" | sed -n "s/$date_re A.... \($size_re\) $size_re\(.*\)/-rw-r--r-- 1 $ugid \5 $date_mc \6/p"
+}
+
+mcualz_copyout ()
+{
+    TMPDIR=`mktemp -d "${MC_TMPDIR:-/tmp}/mctmpdir-ualz.XXXXXX"` || exit 1
+    cd "$TMPDIR"
+
+    $UNALZ "$1" "$2" >/dev/null
+    cat "$2" > "$3"
+
+    cd /
+    rm -rf "$TMPDIR"
+}
+
+# override any locale for dates
+LC_ALL=C
+export LC_ALL
+
+umask 077
+
+cmd="$1"
+shift
+
+case "$cmd" in
+  list)    mcualz_list    "$@" ;;
+  copyout) mcualz_copyout "$@" ;;
+  *) exit 1 ;;
+esac
+exit 0
diff -u ./extfs.ini.orig ./extfs.ini
--- ./extfs.ini.orig	2005-07-11 11:53:32.000000000 +0900
+++ ./extfs.ini	2005-07-14 18:19:51.000000000 +0900
@@ -8,6 +8,7 @@
 urar
 uha
 u7z
+ualz
 # For arj usage you need a special patch to unarj (see unarj.diff)
 uarj
 

Attachment: pgpHK5RQB4b7I.pgp
Description: PGP signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]