mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 03:50:37 +02:00
add aarch64 support to quickinst and add local mode support to quickinst
This commit is contained in:
parent
e537151129
commit
b370fe6911
1 changed files with 31 additions and 8 deletions
|
@ -1,12 +1,25 @@
|
|||
#!/usr/bin/env bash
|
||||
LOCAL_DB="/var/cache/pacman/pkg/archboot.db"
|
||||
DESTDIR="${1}"
|
||||
|
||||
PACMAN="pacman --root ${DESTDIR} --cachedir ${DESTDIR}/var/cache/pacman/pkg --noconfirm"
|
||||
|
||||
RUNNING_ARCH="$(uname -m)"
|
||||
# name of kernel package
|
||||
KERNELPKG="linux"
|
||||
# name of the kernel image
|
||||
VMLINUZ="vmlinuz-${KERNELPKG}"
|
||||
[[ "${RUNNING_ARCH}" == "x86_64" ]] && VMLINUZ="vmlinuz-${KERNELPKG}"
|
||||
[[ "${RUNNING_ARCH}" == "aarch64" ]] && VMLINUZ="Image.gz"
|
||||
|
||||
custom_pacman_conf() {
|
||||
NEXTITEM="4"
|
||||
_PACMAN_CONF="$(mktemp /tmp/pacman.conf.XXX)"
|
||||
#shellcheck disable=SC2129
|
||||
echo "[options]" >> "${_PACMAN_CONF}"
|
||||
echo "Architecture = auto" >> "${_PACMAN_CONF}"
|
||||
echo "SigLevel = Required DatabaseOptional" >> "${_PACMAN_CONF}"
|
||||
echo "LocalFileSigLevel = Optional" >> "${_PACMAN_CONF}"
|
||||
echo "[archboot]" >> "${_PACMAN_CONF}"
|
||||
echo "Server = file:///var/cache/pacman/pkg" >> "${_PACMAN_CONF}"
|
||||
PACMAN_CONF="--config ${_PACMAN_CONF}"
|
||||
}
|
||||
|
||||
usage() {
|
||||
echo "quickinst <destdir>"
|
||||
|
@ -14,11 +27,14 @@ usage() {
|
|||
echo "This script is for users who would rather partition/mkfs/mount their target"
|
||||
echo "media manually than go through the routines in the setup script."
|
||||
echo
|
||||
echo "First configure /etc/pacman.conf which repositories to use"
|
||||
echo "and set a mirror in /etc/pacman.d/mirrorlist"
|
||||
echo ""
|
||||
if ! [[ -e "${LOCAL_DB}" ]]; then
|
||||
echo "First configure /etc/pacman.conf which repositories to use"
|
||||
echo "and set a mirror in /etc/pacman.d/mirrorlist"
|
||||
fi
|
||||
echo
|
||||
echo "Make sure you have all your filesystems mounted under <destdir>."
|
||||
echo "Then run this script to install all base packages to <destdir>."
|
||||
echo "Then run this script to install all packages listed in /etc/archboot/defaults"
|
||||
echo "to <destdir>."
|
||||
echo
|
||||
echo "Example:"
|
||||
echo " quickinst /mnt"
|
||||
|
@ -143,6 +159,13 @@ fi
|
|||
|
||||
! [[ -d /tmp ]] && mkdir /tmp
|
||||
|
||||
if [[ -e "${LOCAL_DB}" ]]; then
|
||||
custom_pacman_conf
|
||||
else
|
||||
PACMAN_CONF=""
|
||||
fi
|
||||
PACMAN="pacman --root ${DESTDIR} ${PACMAN_CONF} --cachedir ${DESTDIR}/var/cache/pacman/pkg --noconfirm"
|
||||
|
||||
# prepare pacman
|
||||
prepare_pacman || (echo "Pacman preparation FAILED!"; return 1)
|
||||
|
||||
|
|
Loading…
Reference in a new issue