Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tyil/lonestar

A small Bash application to install the Rakudo Star Perl 6 distribution
https://github.com/tyil/lonestar

bash bash-script installer installer-script perl6

Last synced: 16 days ago
JSON representation

A small Bash application to install the Rakudo Star Perl 6 distribution

Awesome Lists containing this project

README

        

= LoneStar
:toc: preamble

A small Bash application to install the
https://rakudo.perl6.org/downloads/star/[Rakudo Star] https://perl6.org[Perl 6]
distribution.

== Installation
=== Archlinux
LoneStar https://aur.archlinux.org/packages/lonestar/[is available in the AUR],
and can be installed from there.

[source,sh]
----
cd -- "$(mktemp -d)"
git clone https://aur.archlinux.org/lonestar.git .
makepkg -csi
----

=== Debian and derivatives (e.g. Ubuntu)
[source,sh]
----
apt install build-essential git curl sudo
cd -- "$(mktemp -d)"
git clone https://github.com/tyil/lonestar.git .
sudo make install
----

=== Gentoo and derivatives (e.g. Funtoo)
LoneStar is included in the
https://github.com/scriptkitties/overlay[Scriptkitties Overlay], which should
work for any distribution using Portage. There are
https://github.com/scriptkitties/overlay#installation[overlay installation
instructions] available at the README in the overlay repository.

Once the overlay has been set up, you can install LoneStar using `emerge`:

[source,sh]
----
emerge dev-util/lonestar
----

=== From source
To install the application from the plain sources, run the following commands.

[NOTE]
====
You'll need the following dependencies to be available: `git`, `make`, `curl`,
`perl`. If you want to install to `/usr`, you'll also need some way to run
`make install` with root, such as `sudo`.
====

[source,sh]
----
cd -- "$(mktemp -d)"
git clone https://github.com/tyil/lonestar.git .
make install
----

This will install the application into `/usr`. `make` can take a `DESTDIR` to
change the installation path if desired.

== Usage
[TIP]
====
TL;DR: `lonestar install && eval $(lonestar init)` to get started, `echo 'eval
$(lonestar init)' >> "$HOME/.$(ps -p $$|tail -n1|awk '{print $NF}')rc"` to set
the `PATH` for new shells as well.
====

For information on how to use the application, you can use the `help` command.

[source,sh]
----
lonestar help
----

To install the latest Rakudo Star distribution you can use `install`.

[source,sh]
----
lonestar install
----

Optionally, you can give it a year.month release name, for example `2018.01`.
This will install the given version. If the version does not exist, an error
will be returned.

To get the path to the directory containing the highest version of Rakudo Star
you have installed, use the `path` command.

[source,sh]
----
lonestar path
----

You can also have LoneStar update the `PATH` for you to include the `bin`
directory (with the `perl6` executable) with the `init` command.

[source,sh]
----
eval $(lonestar init)
----

Both `path` and `init` will use the latest available Rakudo Star you have
installed. Optionally, they can use a `year.month` release name. This will then
use the given version for the paths. If the given version is not available, an
error will be returned.

To add these paths to your `PATH` for new shells as well, add it to your
shell's configuration file. Using most shells, you can use the magic line `ps
-p $$|tail -n1|awk '{print $NF}'` to inject your current shell's name.

[source,sh]
----
echo 'eval $(lonestar init)' \
>> "$HOME/.$(ps -p $$|tail -n1|awk '{print $NF}')rc"
----

=== Configuration
Configuration is done using a `bash` script with `export` statements. This is
done to keep the application simple. The configuration file should exist at
`${XDG_CONFIG_HOME}/lonestar/config.sh`. If `$XDG_CONFIG_HOME` is not set,
`$HOME/.config` will be assumed.

The following configuration options can be set:

- `RAKUDO_ROOT` - The path where the Rakudo Star distributions will be
installed.

The defaults are specified in `etc/lonestar/user.sh`, which can serve as an
example config file as well if you're unsure of how to use it.

== License
This application is released under the terms of the GNU AGPL version 3 or
later. For more information, refer to the `LICENSE.txt` file provided in the
source tree.