Changeset 169


Ignore:
Timestamp:
Jan 19, 2018, 3:54:45 PM (3 years ago)
Author:
g7moreau
Message:
  • Small bug for file in root folder
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/project-meta/project-meta

    r168 r169  
    128128   for my $folder (sort keys %folders) {
    129129      print "chmod o+rX,o-w $current_dir/$folder\n";
    130       print "mkdir -p $dap_folder/$acronym/$folder\n" if -d $current_dir/$folder;
     130      print "mkdir -p $dap_folder/$acronym/$folder\n" if -d "$current_dir/$folder";
    131131      }
    132132
    133133   for my $dataset (@{$meta->{'public-dap'}{'data-set'}}) {
    134       my $folder = $dataset =~ s{/[^/]+$}{}r;
    135       print "ln --symbolic --target-directory $dap_folder/$acronym/$folder/ $current_dir/$dataset\n";
     134      if ($dataset =~ m{/}) {
     135         # Folder case
     136         my $folder = $dataset =~ s{/[^/]+$}{}r;
     137         print "ln --symbolic --target-directory $dap_folder/$acronym/$folder/ $current_dir/$dataset\n";
     138         }
     139      else {
     140         # File case
     141         print "ln --symbolic --target-directory $dap_folder/$acronym/ $current_dir/$dataset\n";
     142         }
    136143
    137144   print "chmod -R o+rX,o-w $dap_folder/$acronym/\n";
Note: See TracChangeset for help on using the changeset viewer.