An installer for Perl 6, written in Bash
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Patrick Spek 5546b32bcb
Update README to refer to the AUR package
1 year ago
bin Apply fixes for Archlinux release 1 year ago
etc/lonestar Use Bash instead of POSIX sh 1 year ago
lib/lonestar Apply fixes for Archlinux release 1 year ago
share/lonestar/help Expand the help pages 1 year ago
CHANGELOG.md Bump version to 1.0.1 1 year ago
LICENSE.txt Add the LICENSE file 1 year ago
Makefile Apply fixes for Archlinux release 1 year ago
README.adoc Update README to refer to the AUR package 1 year ago

README.adoc

= 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/.${SHELL}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}rc`.

[source,sh]
----
echo 'eval $(lonestar init)' >> "$HOME/${SHELL}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.