Package: unp
Version: 1.0.10
Severity: normal
Tags: patch

Had problem with unp-acking a file sent to me with a Mac... the error
given was:

$ unp 01.pdf 
01.pdf - unknown extension, checking with "file"
Warning, the following unarchiv program(s) could not be found:
   a=`hexbin
Please install the package(s): a=`hexbin

To correct the problem I patched the file /usr/bin/unp.
Patch attached.

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.11-tm290
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)

unp depends on no packages.

Versions of packages unp recommends:
ii  bzip2                         1.0.2-8.1  high-quality block-sorting file co

-- no debconf information
--- /usr/bin/unp        2004-07-22 23:16:47.000000000 +0200
+++ /usr/bin/unp.mio    2005-09-06 20:25:10.000000000 +0200
@@ -187,7 +187,7 @@
    if ($filestr =~ /RPM/) { set_command "rpm2cpio < \"$file\" | cpio -i -d     
--verbose $ARGS";}
    # RAR can also create executables
    if ($filestr =~ /executable/i){set_command "orange \"$file\" || unzip 
\"$file\" || unrar x \"$file\" || rar x \"$file\" || unarj x \"$file\" || lha x 
\"$file\"";}
-   if ($filestr =~ /BinHex/i) {set_command "a=`hexbin -v \"$file\" 2>&1`; 
bla=`echo \$a | sed -e 's/.* name=\"\\(.*\\)\".*/\\1/'`; macunpack -v 
\$bla.bin;"}
+   if ($filestr =~ /BinHex/i) {set_command "macunpack \$(hexbin -v \"$file\" 
2>&1 |grep name|sed -e 's/name=\"\\(.*\\)\".*/\\1/').bin;"}
 
    # if still nothing could be found, print an error message
    if ($command eq "") {

Reply via email to