source: app/dist/common/find_perl_deps.pl @ 9ace5d2

help
Last change on this file since 9ace5d2 was 317d53b, checked in by pawelk <pawelk@…>, 16 years ago

Dodalem skrypty, zwiazane z obsluga zaleznosci w tarballu.

git-svn-id: svn://atos.wmid.amu.edu.pl/utt@22 e293616e-ec6a-49c2-aa92-f4a8b91c5d16

  • Property mode set to 100644
File size: 683 bytes
Line 
1
2
3while(<STDIN>) {
4        chomp;
5    # najpierw nazwa pliku zrodlowego out
6    if($_ =~ /^[^:]*\:\s*(.*)$/) {
7        my $line = $1;
8#       print "TEXT: $line\n";
9        # teraz tylko samo polecenie
10        if($line =~ /\`\s*(.+)\s*\`/) {
11            my $cmd = $1;
12#           print "CMD: $cmd\n";
13            # teraz splitujemy potoki
14            my @progs = split(/\s*\|\s*/, $cmd);
15            foreach (@progs) {
16#               print "$_\n";
17                # ucinamy agrumenty programu
18                # oraz linie, zawierajace nie-programy (--replace, $tmpfile_x, /g, \\, itp.)
19                if($_ =~ /^([^\$\\\/\s\']+)(\s.*)?$/) {
20                    my $app = $1;
21#                   print "APP: $app\n";
22#                   my $res = `which $app`;
23#                   print "WYNIK: $res\n";
24                    print "$app\n";
25                }
26            } # foreach
27        }
28    }
29}
Note: See TracBrowser for help on using the repository browser.