Build Raku from source

Here's my shell script for building MoarVM, Not Quite Perl, and Rakudo from source.

#!/usr/bin/env bash

SRC=~/rakudo/src
INSTALL=~/rakudo

rm -rf $INSTALL

if [ ! -d $SRC ]
then
    echo "Creating $SRC"
    mkdir -p $SRC
fi

cd $SRC

git clone git@github.com:MoarVM/MoarVM.git
git clone git@github.com:Raku/nqp.git
git clone git@github.com:rakudo/rakudo.git
git clone git@github.com:ugexe/zef.git

#cd $SRC/rakudo/t; pwd
#git clone git@github.com:Raku/roast.git spec

cd $SRC/MoarVM; pwd
perl Configure.pl --prefix $INSTALL && make -j17 && make install

cd $SRC/nqp; pwd
perl Configure.pl --backend=moar --prefix=$INSTALL && make -j17 && make install

cd $SRC/rakudo; pwd
perl Configure.pl --backend=moar --prefix=$INSTALL && make -j17 && make install

$INSTALL/bin/rakudo -v

PATH=$INSTALL/bin:$INSTALL/share/perl6/site/bin:$PATH
printf "\nDon't forget to add $INSTALL/bin and $INSTALL/share/perl6/site/bin to your \$PATH\n"

cd $SRC/zef; pwd
raku -I. bin/zef install .

zef install Linenoise
zef install TAP::Harness
zef install App::Prove6
zef install JSON::Tiny
zef install DBIish --force-test
zef install Log::Async
zef install Test::Output

You have to use --force-test to install certain Raku modules if you don't have all the prerequisites for the tests to pass.

raku (17) moarvm (1) build (1) zef (1) readline (1) nqp (1)