mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 03:50:37 +02:00
add create repository for riscv64, rename aarch64_download_packages to other_download_packages
This commit is contained in:
parent
83a953febd
commit
f425f1675d
3 changed files with 31 additions and 2 deletions
|
@ -20,7 +20,7 @@ fi
|
||||||
if [[ "${_RUNNING_ARCH}" == "x86_64" ]]; then
|
if [[ "${_RUNNING_ARCH}" == "x86_64" ]]; then
|
||||||
_aarch64_pacman_chroot "${_REPODIR}" || exit 1
|
_aarch64_pacman_chroot "${_REPODIR}" || exit 1
|
||||||
_create_pacman_conf "${_REPODIR}" "use_container_config"
|
_create_pacman_conf "${_REPODIR}" "use_container_config"
|
||||||
_aarch64_download_packages "${_REPODIR}" || exit 1
|
_other_download_packages "${_REPODIR}" || exit 1
|
||||||
fi
|
fi
|
||||||
_move_packages "${_REPODIR}" "${1}" || exit 1
|
_move_packages "${_REPODIR}" "${1}" || exit 1
|
||||||
_cleanup_repodir "${_REPODIR}" || exit 1
|
_cleanup_repodir "${_REPODIR}" || exit 1
|
||||||
|
|
29
usr/bin/archboot-riscv64-create-repository.sh
Executable file
29
usr/bin/archboot-riscv64-create-repository.sh
Executable file
|
@ -0,0 +1,29 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
# created by Tobias Powalowski <tpowa@archlinux.org>
|
||||||
|
. /usr/lib/archboot/common.sh
|
||||||
|
. /usr/lib/archboot/container.sh
|
||||||
|
. /usr/lib/archboot/repository.sh
|
||||||
|
_ARCHBOOT="archboot-riscv"
|
||||||
|
[[ -d "${1}" ]] || (echo "Create directory ${1} ..."; mkdir "${1}")
|
||||||
|
_REPODIR="$(mktemp -d "${1}"/repository.XXX)"
|
||||||
|
_CACHEDIR="${_REPODIR}/var/cache/pacman/pkg"
|
||||||
|
[[ -z "${1}" ]] && _usage
|
||||||
|
_root_check
|
||||||
|
_cachedir_check
|
||||||
|
echo "Starting repository creation ..."
|
||||||
|
if [[ "${_RUNNING_ARCH}" == "riscv64" ]]; then
|
||||||
|
_create_pacman_conf "${_REPODIR}"
|
||||||
|
_prepare_pacman "${_REPODIR}" || exit 1
|
||||||
|
_download_packages "${_REPODIR}" || exit 1
|
||||||
|
_umount_special "${_REPODIR}" || exit 1
|
||||||
|
fi
|
||||||
|
if [[ "${_RUNNING_ARCH}" == "x86_64" ]]; then
|
||||||
|
_riscv64_pacman_chroot "${_REPODIR}" || exit 1
|
||||||
|
_create_pacman_conf "${_REPODIR}" "use_container_config"
|
||||||
|
_other_download_packages "${_REPODIR}" || exit 1
|
||||||
|
fi
|
||||||
|
_move_packages "${_REPODIR}" "${1}" || exit 1
|
||||||
|
_cleanup_repodir "${_REPODIR}" || exit 1
|
||||||
|
_create_archboot_db "${1}" || exit 1
|
||||||
|
echo "Finished repository creation in ${_REPODIR} ."
|
||||||
|
|
|
@ -27,7 +27,7 @@ _download_packages() {
|
||||||
pacman --root "${1}" -Syw ${_PACKAGES} ${_ARCHBOOT} ${_GRAPHICAL_PACKAGES} --ignore systemd-resolvconf --noconfirm --cachedir "${_CACHEDIR}" >/dev/null 2>&1
|
pacman --root "${1}" -Syw ${_PACKAGES} ${_ARCHBOOT} ${_GRAPHICAL_PACKAGES} --ignore systemd-resolvconf --noconfirm --cachedir "${_CACHEDIR}" >/dev/null 2>&1
|
||||||
}
|
}
|
||||||
|
|
||||||
_aarch64_download_packages() {
|
_other_download_packages() {
|
||||||
mkdir "${1}"/blankdb
|
mkdir "${1}"/blankdb
|
||||||
echo "Adding ${_GPG_KEY_ID} to trusted keys"
|
echo "Adding ${_GPG_KEY_ID} to trusted keys"
|
||||||
[[ -d "${1}"/usr/share/archboot/gpg ]] || mkdir -p "${1}"/usr/share/archboot/gpg
|
[[ -d "${1}"/usr/share/archboot/gpg ]] || mkdir -p "${1}"/usr/share/archboot/gpg
|
||||||
|
|
Loading…
Reference in a new issue