Author: pebender
Date: Tue May 12 13:11:19 2009
New Revision: 4753

Modified:
    trunk/gar-minimyth/script/perl/perl-MiniMyth/checksums
    trunk/gar-minimyth/script/perl/perl-MiniMyth/files/MiniMyth.pm

Log:
- Cleaned-up confro, confrw and dist URLs so they don't include an extra  
slash.



Modified: trunk/gar-minimyth/script/perl/perl-MiniMyth/checksums
==============================================================================
--- trunk/gar-minimyth/script/perl/perl-MiniMyth/checksums      (original)
+++ trunk/gar-minimyth/script/perl/perl-MiniMyth/checksums      Tue May 12  
13:11:19 2009
@@ -1 +1 @@
-ee4b9460a17a401d5a79d4c2fd9b31a8  download/MiniMyth.pm
+bc458e44f2ed3625d606e66872797c68  download/MiniMyth.pm

Modified: trunk/gar-minimyth/script/perl/perl-MiniMyth/files/MiniMyth.pm
==============================================================================
--- trunk/gar-minimyth/script/perl/perl-MiniMyth/files/MiniMyth.pm       
(original)
+++ trunk/gar-minimyth/script/perl/perl-MiniMyth/files/MiniMyth.pm      Tue May 
 
12 13:11:19 2009
@@ -1086,11 +1086,14 @@
          when (/^confro$/)
          {
              my $hostname = $self->hostname();
+            my $file_0 = $file;
+            $file_0 =~ s/\/+/\//g;
+            $file_0 =~ s/^\///;
              if ($hostname)
              {
-                push(@list,  
$self->var_get('MM_MINIMYTH_BOOT_URL') . 'conf/' . $hostname . '/' . $file);
+                push(@list,  
$self->var_get('MM_MINIMYTH_BOOT_URL') . 'conf/' . $hostname . '/' .  
$file_0);
              }
-            push(@list,  
$self->var_get('MM_MINIMYTH_BOOT_URL') . 'conf/' .'default' . '/' . $file);
+            push(@list,  
$self->var_get('MM_MINIMYTH_BOOT_URL') . 'conf/' .'default' . '/' .  
$file_0);
          }
          when (/^confrw$/)
          {
@@ -1098,6 +1101,8 @@
              if ($hostname)
              {
                  my $file_0 = $file;
+                $file_0 =~ s/\/+/\//g;
+                $file_0 =~ s/^\///;
                  $file_0 =~ s/\//+/;
                  push(@list,  
$self->var_get('MM_MINIMYTH_BOOT_URL') . 'conf-rw/' . $hostname . '+' .  
$file_0);
              }
@@ -1109,10 +1114,10 @@
                  if ($self->var_get('MM_ROOTFS_IMAGE'))
                  {
                      my $file_0 = $self->var_get('MM_ROOTFS_IMAGE');
-                    $file_0 =~ s/\/+/\//g;
                      $file_0 =~ s/[^\/]+$//g;
-                    $file_0 =~ s/\/$//g;
                      $file_0 .= '/' . $file;
+                    $file_0 =~ s/\/+/\//g;
+                    $file_0 =~ s/^\///;
                      push(@list, $self->var_get('MM_MINIMYTH_BOOT_URL') .  
$file_0);
                  }
                  else
@@ -1120,11 +1125,15 @@
                      if ($self->var_get('MM_MINIMYTH_BOOT_URL')  
eq 'file:/minimyth/')
                      {
                          my $file_0 = $file;
+                        $file_0 =~ s/\/+/\//g;
+                        $file_0 =~ s/^\///;
                          push(@list,  
$self->var_get('MM_MINIMYTH_BOOT_URL') . $file_0);
                      }
                      else
                      {
                          my $file_0 = 'minimyth-' .  
$self->var_get('MM_VERSION') . '/' . $file;
+                        $file_0 =~ s/\/+/\//g;
+                        $file_0 =~ s/^\///;
                          push(@list,  
$self->var_get('MM_MINIMYTH_BOOT_URL') . $file_0);
                      }
                      $self->message_log('info', qq(expanding '$url':  
guessed '$list[$#list]' because distribution location is unknown.));
@@ -1133,11 +1142,11 @@
          }
          when (/^file$/  )
          {
-            push(@list, 'file:' . $file);
+            push(@list, $url);
          }
          when (/^http$/  )
          {
-            push(@list, 'http://' . $server . '/' . $file);
+            push(@list, $url);
          }
          when (/^hunt$/  )
          {
@@ -1146,7 +1155,7 @@
          }
          when (/^tftp$/  )
          {
-            push(@list, 'tftp://' . $server . '/' . $file);
+            push(@list, $url)
          }
          default
          {

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"minimyth-commits" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/minimyth-commits?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to