vstup/skriptování-proměnné.pl
author František Kučera <franta-hg@frantovo.cz>
Sun, 01 Jul 2012 14:43:21 +0200
changeset 103 aa91d1c6d4c1
child 104 9224b3d36c61
permissions -rwxr-xr-x
#20 Skriptování: možnost spouštět skripty ze souborů (atribut: src).
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
103
aa91d1c6d4c1 #20 Skriptování: možnost spouštět skripty ze souborů (atribut: src).
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     1
#!/usr/bin/perl
aa91d1c6d4c1 #20 Skriptování: možnost spouštět skripty ze souborů (atribut: src).
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     2
aa91d1c6d4c1 #20 Skriptování: možnost spouštět skripty ze souborů (atribut: src).
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     3
# Projde zdroják v javě a najde v něm,
aa91d1c6d4c1 #20 Skriptování: možnost spouštět skripty ze souborů (atribut: src).
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     4
# jaké proměnné prostředí se nastavují pro běh skriptů
aa91d1c6d4c1 #20 Skriptování: možnost spouštět skripty ze souborů (atribut: src).
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     5
aa91d1c6d4c1 #20 Skriptování: možnost spouštět skripty ze souborů (atribut: src).
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     6
use strict;
aa91d1c6d4c1 #20 Skriptování: možnost spouštět skripty ze souborů (atribut: src).
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     7
use warnings;
aa91d1c6d4c1 #20 Skriptování: možnost spouštět skripty ze souborů (atribut: src).
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     8
aa91d1c6d4c1 #20 Skriptování: možnost spouštět skripty ze souborů (atribut: src).
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     9
open(JAVA, "<", $ENV{"XWG_SKRIPTOVANI_JAVA"}) or die $!;
aa91d1c6d4c1 #20 Skriptování: možnost spouštět skripty ze souborů (atribut: src).
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    10
aa91d1c6d4c1 #20 Skriptování: možnost spouštět skripty ze souborů (atribut: src).
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    11
while (<JAVA>) {
aa91d1c6d4c1 #20 Skriptování: možnost spouštět skripty ze souborů (atribut: src).
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    12
	if (/"(.*)=".*\/\/\s+env:(.*)/) {
aa91d1c6d4c1 #20 Skriptování: možnost spouštět skripty ze souborů (atribut: src).
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    13
		print "<tr><td><code>$1</code></td><td>$2</td></tr>\n";
aa91d1c6d4c1 #20 Skriptování: možnost spouštět skripty ze souborů (atribut: src).
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    14
	}
aa91d1c6d4c1 #20 Skriptování: možnost spouštět skripty ze souborů (atribut: src).
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    15
}
aa91d1c6d4c1 #20 Skriptování: možnost spouštět skripty ze souborů (atribut: src).
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    16