The world of Zaurus software is split in two. This quick hack makes it easier to hand-install OPIE-based packages when using a Sharp-based ROM (once you get Perl installed). It just extracts files from an OPIE-based package file ('ar' format?).

#!/usr/bin/perl -w use strict; my $line= <>; die "Not a Debian archive.$/" if "!<arch>$/" ne $line; while( defined( $line= <> ) ) { next if $/ eq $line; my( $name, $size )= ( split ' ', $line )[0,-2]; $name =~ s-/$--; if( -e $name ) { warn "Saving $name as $name.tmp$/"; $name .= '.tmp'; } open OUT, "> $name" or die "Can't create $name: $!$/"; warn "Writing $name ...$/"; local( $/ )= \4096; while( $size ) { $/= \$size if $size < ${$/}; print OUT <>.''; $size -= ${$/}; } close OUT or warn "Error closing $name: $!$/"; }

Just 'dx file.ipk' to extract the files into your current directory.

...though my original method that combined the Zaurus versions of head, tail, dd (which are all quite limited), and several by-hand iterations including copy'n'pasting sizes was rather fun...

- tye        


In reply to Installing Zaurus software by tye

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.