From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Thu, 15 May 2003 09:43:17 +0300 From: Michael Shigorin To: community@altlinux.ru Message-ID: <20030515064317.GI374@osdn.org.ua> Mail-Followup-To: community@altlinux.ru References: <10186928126.20030422154437@scs-900.ru> <11759.030512@taxpol.krasnoyarsk.su> <20030512145825.69afac1d.olli@rbauto.ru> <20030513193551.GE374@osdn.org.ua> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="eZ3aQ+9eILDO8Gbp" Content-Disposition: inline In-Reply-To: <20030513193551.GE374@osdn.org.ua> User-Agent: Mutt/1.4.1i Subject: [Comm] iso9660 vfs for mc (was: =?koi8-r?B?0sHT?= =?koi8-r?B?y9LB08vB?= mc) Sender: community-admin@altlinux.ru Errors-To: community-admin@altlinux.ru X-BeenThere: community@altlinux.ru X-Mailman-Version: 2.0.9 Precedence: bulk Reply-To: community@altlinux.ru List-Unsubscribe: , List-Id: List-Post: List-Help: List-Subscribe: , List-Archive: Archived-At: List-Archive: List-Post: --eZ3aQ+9eILDO8Gbp Content-Type: multipart/mixed; boundary="gd+outVunBU67ahz" Content-Disposition: inline Content-Transfer-Encoding: 8bit --gd+outVunBU67ahz Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: 8bit On Tue, May 13, 2003 at 10:35:51PM +0300, Michael Shigorin wrote: > PS: если кто не заметил -- в альтовский mc недавно добавилось > умение лазать по .iso от пользователя :) А. Вспомнил. После того, как письмо ушло, я понял, что ушло-то оно лично, а надо бы в рассылку (и заодно доцепить vfs :). Сделал bounce to community@ вдогонку :) [ пользователям не-mutt можно в общем случае не беспокоиться :) ] Аттач можно положить в /usr/share/mc/extfs/iso, сделать chmod +x /usr/share/mc/extfs/iso echo "iso" >> /usr/share/mc/extfs/extfs.ini и добавить куда-то (у меня это был существующий ~/.mc/bindings) привязку на манер, скажем, tar: # .iso shell/.iso Open=%cd %p#iso -- ---- WBR, Michael Shigorin ------ Linux.Kiev http://www.linux.kiev.ua/ --gd+outVunBU67ahz Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="iso9660.in" #! /bin/sh # ISO9660 VFS for MC by Michael Shigorin , # modifications by Grigory Milev # and Kachalov Anton April 2003 # based on lslR by Tomas Novak April 2000 # -- look there for additional parsing comments if needed # tested to comply with isoinfo 2.0's output test_iso () { CHARSET=`echo $save_ctype | sed -n -e 's/.*\.\(.*\)"$/\1/p' |tr '[A-Z]' '[a-z]'` if test -n "$CHARSET"; then isoinfo -j $CHARSET 2>&1 | grep "Unknown charset" >/dev/null && CHARSET= fi if test -n "$CHARSET"; then JOLIET_OPT="-j $CHARSET -J" else JOLIET_OPT="-J" fi ISOINFO="isoinfo -R" isoinfo -d -i "$1" | grep "NO Joliet" > /dev/null || ISOINFO="$ISOINFO $JOLIET_OPT" } mcisofs_list () { # left as a reminder to implement compressed image support =) case "$1" in *.bz2) MYCAT="bzip2 -dc";; *.gz) MYCAT="gzip -dc";; *.z) MYCAT="gzip -dc";; *.Z) MYCAT="gzip -dc";; *) MYCAT="cat";; esac $ISOINFO -l -i "$1" | @AWK@ ' BEGIN { dir=""; # Pattern to match 8 first fields. rx = "[^ ]+[ ]+"; rx = "^" rx rx rx rx rx rx rx rx; irx = "^. *[0-9]+. "; } /^$/ { next } /^d---------/ { next } /^Directory listing of [^ ].*$/ { dir=substr($0, 23); next; } { $11 != "" } { name=$0 sub(rx, "", name) attr=substr($0, 1, length($0)-length(name)) # strip inodes and extra dir entries; fix perms sub(irx, "", name) sub("^---------- 0 0 0", "-r--r--r-- 1 root root", attr) sub(" $", "", name) ## sub(";[0-9]+$", "", name) ## would break copyout # skip . and .. if (name ~ /^\.\.?/) next; printf "%s%s%s\n", attr, dir, name }' } mcisofs_copyout () { $ISOINFO -i "$1" -x "/$2" > "$3" } save_ctype=`locale | grep LC_CTYPE` LC_ALL=C cmd="$1" shift case "$cmd" in list) test_iso "$@"; mcisofs_list "$@"; exit 0;; copyout) test_iso "$@"; mcisofs_copyout "$@"; exit 0;; esac exit 1 --gd+outVunBU67ahz-- --eZ3aQ+9eILDO8Gbp Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE+wzcFbsPDprYMm3IRAi57AJ90gA7PFcz6XVUaBH5ryRsk3VrptACffwUy 8nwBmahmfWc9XnB8GrDC0OU= =Xm03 -----END PGP SIGNATURE----- --eZ3aQ+9eILDO8Gbp--