|
6 | 6 | use autodie;
|
7 | 7 | use Data::Dumper;
|
8 | 8 |
|
9 |
| -chdir glob '~'; |
| 9 | +my $home = glob('~'); |
| 10 | +my $qhome = "$home/toqast"; |
10 | 11 |
|
11 |
| -my $home = glob('~') . '/'; |
12 |
| -my @dirs = qw(toqast-inst1 toqast-inst2); |
13 |
| -my %swap = (@dirs, reverse(@dirs)); |
14 | 12 |
|
15 |
| -my $link = 'toqast-inst'; |
16 |
| - |
17 |
| -my $now = readlink $link; |
18 |
| -my $other = $swap{$now}; |
19 |
| - |
20 |
| -say "Other: '$other'"; |
21 |
| -chdir "${home}toqast/parrot"; |
| 13 | +chdir "$qhome/parrot"; |
22 | 14 | system('git', 'pull');
|
23 |
| -chdir "${home}toqast/nqp"; |
| 15 | +chdir "$qhome/nqp"; |
| 16 | +system('git', 'checkout', 'toqast'); |
24 | 17 | system('git', 'pull');
|
25 |
| -chdir "${home}toqast"; |
| 18 | +chdir $qhome; |
26 | 19 | system('git', 'pull');
|
27 | 20 |
|
28 |
| -my $revision_file = "$home$other/rakudo-revision"; |
| 21 | +my $revision_file = "$qhome/rakudo-revision"; |
29 | 22 | eval {
|
30 | 23 | open my $fh, '<', $revision_file or break;
|
31 | 24 | my $r = <$fh>;
|
|
40 | 33 | }
|
41 | 34 | };
|
42 | 35 |
|
43 |
| -chdir "${home}toqast/parrot"; |
44 |
| -system($^X, 'Configure.pl', "--prefix=$home$other", '--optimize'); |
| 36 | +chdir "$qhome/parrot"; |
| 37 | +system($^X, 'Configure.pl', "--prefix=$qhome/install", '--optimize'); |
45 | 38 | system('make', 'install')
|
46 | 39 | and die $?;
|
47 |
| -chdir "${home}toqast/nqp"; |
48 |
| -system($^X, 'Configure.pl', '--with-parrot=../parrot/parrot'); |
| 40 | +chdir "$qhome/nqp"; |
| 41 | +system($^X, 'Configure.pl', '--with-parrot=$home/install/bin/parrot'); |
49 | 42 | system('make', 'install') and die $?;
|
50 | 43 | chdir "${home}toqast";
|
51 |
| -system($^X, 'Configure.pl', "--gen-parrot"); |
| 44 | +system($^X, 'Configure.pl'); |
52 | 45 | system('make', 'install') and die $?;
|
53 |
| -system('cp', '-r', <install/*>, "$home$other"); |
54 | 46 | system("git rev-parse HEAD | cut -b 1,2,3,4,5,6 > $revision_file") and warn $?;
|
55 | 47 |
|
56 |
| -chdir $home; |
57 |
| -unlink $link; |
58 |
| -symlink $other, $link; |
59 |
| - |
0 commit comments