chroot_sandboxes/arch/get_pacstrap
Jarvis Carroll c2fcde0f26 arch scripts
It took a moment to work out that there is actually no way of
bootstrapping an arch environment without permanently installing things
to the host system! So we just download a live image and unpack it.

Then after that, getting erlang to work was very easy, just install it,
install zx, run. No R26 incompatibility problems, life is good!
2025-06-04 17:07:45 +10:00

30 lines
904 B
Bash
Executable File

#!/bin/sh
# Finds pacstrap in $PATH, or download some version of it if not found.
# This script prefers to use local copies that are already downloaded, over
# system-wide installations, in case you want to test on some specific
# outdated version of pacstrap.
LOCALDIR=`pwd`/arch-install-scripts
if test -e "$LOCALDIR/pacstrap"
then
echo "Found $LOCALDIR/pacstrap in current directory"
# Run pacstrap without installing it to the system.
bash "$LOCALDIR/pacstrap" "$@"
elif IT=`command -v pacstrap`
then
echo "Found $IT in PATH"
# Use the version of pacstrap that was already installed.
pacstrap "$@"
else
echo "pacstrap not found. Downloading to $LOCALDIR."
git clone https://gitlab.archlinux.org/archlinux/arch-install-scripts
make -C arch-install-scripts pacstrap
# Run pacstrap without installing it to the system.
bash "$LOCALDIR/pacstrap" "$@"
fi