Created
January 8, 2014 01:11
-
-
Save japhb/8309906 to your computer and use it in GitHub Desktop.
japhb's current update-rakudo and rakudo-path scripts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
my $share = '/YOUR/SHARE/ROOT/HERE'; | |
my $share_bin = "$share/perl6/bin"; | |
my ($vms, $ver) = @ARGV; | |
my @vms = split /\s*,\s*/ => $vms || ''; | |
@vms or die "Must specify one or more VMs in path priority order (e.g. 'jvm,parrot') as the first argument.\n"; | |
my @vm_bins; | |
for my $vm (@vms) { | |
my $root = $ver ? "$share/rakudo-$vm-$ver" : "$share/rakudo-$vm"; | |
-e $root or die "Path '$root' does not exist.\n"; | |
my $install = "$root/install"; | |
my $bin = "$install/bin"; | |
my $perl6 = "$bin/perl6-" . substr($vm, 0, 1); | |
my $site = `$perl6 -e 'print %*CUSTOM_LIB<site>'`; | |
my $site_bin = "$site/bin"; | |
push @vm_bins, $site_bin, $bin; | |
} | |
my @stripped = grep { !/rakudo/ && !/perl6/ } split /:/ => $ENV{PATH}; | |
my $path = join ':' => $share_bin, @vm_bins, @stripped; | |
print "$path\n"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
SHARE_ROOT=/YOUR/SHARE/ROOT/HERE/ | |
cd $SHARE_ROOT | |
echo ">>> SANITY CHECKING ..." | |
curl -s -m 15 feather.perl6.nl:3000/projects.json > /dev/null || (echo "Cannot fetch projects file! Panda will fail or lock up!"; exit 1) | |
echo ">>> UPDATING RAKUDO ..." | |
cd rakudo | |
git pull | |
RAKUDO_REV=`git rev-parse HEAD` | |
cd .. | |
echo ">>> UPDATING NQP ..." | |
cd nqp | |
git pull | |
cd .. | |
echo ">>> UPDATING PARROT ..." | |
cd parrot | |
git pull | |
cd .. | |
echo ">>> UPDATING PANDA ..." | |
cd panda | |
git pull | |
git submodule update --init --recursive | |
cd .. | |
echo ">>> MAKING FRESH CLONES FOR RAKUDO-PARROT ..." | |
RAKUDO_PARROT=rakudo-parrot-$RAKUDO_REV | |
git clone rakudo $RAKUDO_PARROT | |
git clone nqp $RAKUDO_PARROT/nqp | |
git clone parrot $RAKUDO_PARROT/parrot | |
echo ">>> MAKING FRESH CLONES FOR RAKUDO-JVM ..." | |
RAKUDO_JVM=rakudo-jvm-$RAKUDO_REV | |
git clone rakudo $RAKUDO_JVM | |
git clone nqp $RAKUDO_JVM/nqp | |
echo ">>> BUILDING RAKUDO-PARROT ..." | |
cd $RAKUDO_PARROT | |
perl Configure.pl --backends=parrot --gen-nqp --gen-parrot \ | |
&& make && make test && make install || exit 2 | |
cd .. | |
echo ">>> BUILDING RAKUDO-JVM ..." | |
cd $RAKUDO_JVM | |
perl Configure.pl --backends=jvm --gen-nqp \ | |
&& make && make test && make install || exit 3 | |
cd .. | |
echo ">>> INSTALLING PANDA & MODULES FOR RAKUDO-PARROT ..." | |
export PATH=`./rakudo-path parrot $RAKUDO_REV` | |
PERL6=$SHARE_ROOT/$RAKUDO_PARROT/install/bin/perl6-p | |
cd panda | |
$PERL6 ./bootstrap.pl || exit 4 | |
panda install Term::ANSIColor File::Temp p6doc Grammar::Debugger | |
panda install --notests Text-Tabs-Wrap | |
panda install Rakudo::Debugger # Parrot-only for now | |
cd .. | |
echo ">>> SETTING rakudo-parrot SYMLINK ..." | |
rm -f rakudo-parrot | |
ln -s $RAKUDO_PARROT rakudo-parrot | |
echo ">>> INSTALLING PANDA & MODULES FOR RAKUDO-JVM ..." | |
export PATH=`./rakudo-path jvm $RAKUDO_REV` | |
PERL6=$SHARE_ROOT/$RAKUDO_JVM/install/bin/perl6-j | |
cd panda | |
$PERL6 ./bootstrap.pl || exit 5 | |
panda install Term::ANSIColor File::Temp p6doc Grammar::Debugger | |
panda install --notests Text-Tabs-Wrap | |
cd .. | |
echo ">>> SETTING rakudo-jvm SYMLINK ..." | |
rm -f rakudo-jvm | |
ln -s $RAKUDO_JVM rakudo-jvm | |
echo ">>> SETTING FINAL PATH ..." | |
export PATH=`./rakudo-path parrot,jvm` | |
perl6-p -v | |
perl6-j -v | |
echo ">>> UPDATES COMPLETE!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment