archboot/usr/bin/archboot-aarch64-create-container.sh

42 lines
1,023 B
Bash
Raw Normal View History

#!/usr/bin/env bash
# created by Tobias Powalowski <tpowa@archlinux.org>
source /usr/lib/archboot/functions
source /usr/lib/archboot/container_functions
2022-02-09 08:59:04 +01:00
_ARCHBOOT="archboot-arm"
2022-02-09 09:05:26 +01:00
_KEYRING="archlinuxarm"
[[ -z "${1}" ]] && _usage
_DIR="$1"
2022-02-09 09:59:28 +01:00
_parameters "$@"
_root_check
echo "Starting container creation ..."
2022-01-10 07:51:04 +01:00
echo "Create directory ${_DIR} ..."
mkdir "${_DIR}"
2022-02-08 20:41:57 +01:00
if [[ "${_RUNNING_ARCH}" == "aarch64" ]]; then
_prepare_pacman
_install_base_packages
2022-02-09 09:59:28 +01:00
_clean_mkinitcpio
_clean_cache
_install_archboot
_umount_special
2022-02-09 09:59:28 +01:00
_clean_container
_clean_archboot_cache
_generate_keyring
_generate_locales
_clean_locale
_copy_mirrorlist_and_pacman_conf
_change_pacman_conf
fi
2022-02-08 20:41:57 +01:00
if [[ "${_RUNNING_ARCH}" == "x86_64" ]]; then
_aarch64_pacman_chroot
2022-02-09 08:59:04 +01:00
_aarch64_install_base_packages
2022-02-09 09:59:28 +01:00
_clean_mkinitcpio
_clean_cache
2022-02-09 08:59:04 +01:00
_aarch64_install_archboot
2022-02-09 09:59:28 +01:00
_clean_mkinitcpio
_clean_cache
_clean_container
_clean_locale
fi
_set_hostname
echo "Finished container setup in ${_DIR} ."