Looks Like the perls cript runs on the Mac, and finds the directories
with data  from the niki-ipod and syncs them to a local directly.  I
dont think this mean perl is running on the nano at all..

Evan

On 2/4/07, Biscuit Thomas <[EMAIL PROTECTED]> wrote:
Ok guys, this is how this file shakes down.
Basically .dmg is the mac's version of an .img/.iso.
So I got the hfs plus the hfsplus utils for my distro (ubuntu)
Then i ran
sudo mkdir /mnt/nano
sudo mount -t hfsplus -o loop Runometer_RunFinder.dmg /mnt/nano
And woolah
It mounted!
the perl script is this, not much i think:

#!/usr/bin/perl
##
# A script intended for wrapping with platypus to either
# 1.) open the hidden directories on your iPod where runs are stored
# or
# 2.) automatically upload runs.
#
# Author: A. Carra
# Copyright 2007, Gordian Labs.

# if invoked with a mount command
# process it (not implemented)

# otherwise, look at everything in "volumes"
# for each one that contains a iPod_Control subdir
# process it
my $mode = 'open'; #will add upload here

while (defined($next = </Volumes/*>)) {
        if (-d $next."/iPod_Control") {
                &processiPod($next, $mode);
        }
}
##
# Process a given iPod candidate directory.
#
#
sub  processiPod {
        my $dir = shift;
        my $mode = shift;

        my $synched_count = 0;
        my $latest_count = 0;

        my $empeds_dir = $dir."/iPod_Control/Device/Trainer/Workouts/Empeds";
        if (-d $empeds_dir) {
                while (defined($next_dir = <$empeds_dir/*>)) {
                        if ($next_dir ne $empeds_dir.'/linkData') {
                                my $latest_dir = $next_dir."/latest";
                                my $synched_dir = $next_dir."/synched";
                                if (-d $latest_dir) {
                                        while (defined($new_workouts = 
<$latest_dir/*.xml>)) {
                                                #print "found latest: 
$new_workouts\n";
                                                $latest_count = $file_count +1;
                                        }
                                }
                                if (-d $synched_dir) {
                                        while (defined($sync_workouts = 
<$synched_dir/*.xml>)) {
                                                #print "found synched: 
$sync_workouts\n";
                                                $synched_count = $file_count +1;
                                        }
                                }
                                if (($latest_count > 0) and ($synched_count > 
0)) {
                                        exec "open $next_dir";
                                } elsif (($latest_count > 0) and ($mode eq 
'open')) {
                                        exec "open $latest_dir";
                                } elsif (($synched_count > 0) and
($mode eq 'open')) {
                                        exec "open $synched_dir";
                                }



                        }
                }
                if ($file_count == 0) {
                        return false;
                } else {
                        return true;
                }
        } else {
                return false;
        }
}


#       my $file = FileHandle->new( $dir );

#       if ( ! defined $file ) {
#               print STDERR "Apple_Runometer::processiPod: file can't be opened 
'$dir'\n";
#               return -1;
#       }

Maybe some kinda wrapper?
Anyways this file is a .app file, which on non mac systems come up as a folder
however it can be executed on a mac and i will try it tomarrow if i
get the chance
however when i look more i think it's ment for a comp, not the ipod
but i dunno
we'll soon see ;)

_______________________________________________
Linux4nano-dev mailing list
[email protected]
https://mail.gna.org/listinfo/linux4nano-dev
http://www.linux4nano.org


_______________________________________________
Linux4nano-dev mailing list
[email protected]
https://mail.gna.org/listinfo/linux4nano-dev
http://www.linux4nano.org

Reply via email to