Skip to content

Instantly share code, notes, and snippets.

@ugexe
Last active May 3, 2023 16:19
Show Gist options
  • Save ugexe/d2bb004eea9c85e10d893952deffe46f to your computer and use it in GitHub Desktop.
Save ugexe/d2bb004eea9c85e10d893952deffe46f to your computer and use it in GitHub Desktop.
class Build {
method build($dist-path) {
my $script = $dist-path.IO.add("bin/my-script").absolute;
# We need to set this if our script uses any dependencies that may
# not yet be installed but are in the process of being installed
# (such as the dist this comes with in lib/).
my @libs = $dist-path, $*REPO.repo-chain.map(*.path-spec).flat;
my $proc = run :cwd($dist-path), $*EXECUTABLE, @libs.map({"-I$_"}).flat, $script;
exit $proc.exitcode;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment