archboot/usr/lib/initcpio/install/archboot_installer
Tobias Powalowski 230f542cfa fix uname -m
2022-02-04 09:09:37 +01:00

37 lines
1.3 KiB
Bash

#!/usr/bin/env bash
# Created by Tobias Powalowski <tpowa@archlinux.org>
build ()
{
_ARCH="$(uname -m)"
if [[ "${_ARCH}" == "x86_64" ]]; then
_ARCHINSTALL_URL="https://pkgbuild.com/~tpowa/archboot-helper/archinstall/archinstall.${_ARCH}"
_ARCHINSTALL=$(mktemp -d /var/tmp/archinstall.XXX)
curl -s --create-dirs -L -O --output-dir "${_ARCHINSTALL}" "${_ARCHINSTALL_URL}"
chmod 755 "${_ARCHINSTALL}/archinstall.${_ARCH}"
add_binary "${_ARCHINSTALL}/archinstall.${_ARCH}" "/usr/bin/archinstall"
fi
apps="genfstab arch-chroot pacstrap \
archboot-$(uname -m)-release.sh archboot-mktorrent.sh \
archboot-restore-usbstick.sh isoinfo mktorrent archboot-copy-mountpoint.sh \
archboot-rsync-backup.sh archboot-binary-check.sh"
for i in $apps; do
add_binary "$i"
done
add_file "/usr/bin/archboot-setup.sh" "/usr/bin/setup"
add_file "/usr/bin/archboot-quickinst.sh" "/usr/bin/quickinst"
# only include cachedir on booted archboot or container
if [[ -e "/etc/hostname" ]]; then
[[ "$(cat /etc/hostname)" == "archboot" ]] && add_full_dir "/var/cache/pacman/pkg"
else
add_full_dir "/var/cache/pacman/pkg"
fi
}
help ()
{
cat<<HELPEOF
This hook includes the archboot installer,archinstaller and arch-install-scripts
on an archboot image.
HELPEOF
}