#!/bedrock/libexec/busybox sh # # MX Linux bootstrap support # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # version 2 as published by the Free Software Foundation. # # Copyright (c) 2026 Daniel Thau # # shellcheck source=src/slash-bedrock/libexec/brl-fetch . /bedrock/share/common-code trap 'fetch_abort "Unexpected error occurred."' EXIT check_supported() { false } speed_test_url() { echo "dists/${target_release}/Release" } list_mirrors() { echo 'http://mxrepo.com/mx/repo' } brl_arch_to_distro() { case "${1}" in "aarch64") echo "arm64" ;; "armv7hl") echo "armhf" ;; "i686") echo "i386" ;; "x86_64") echo "amd64" ;; *) abort "brl does not know how to translate arch \"${1}\" to ${distro} format" ;; esac } list_architectures() { cat <"${target_dir}/etc/apt/sources.list" echo "deb ${debian_mirror} ${target_release}-updates main contrib non-free" >>"${target_dir}/etc/apt/sources.list" echo "deb http://security.debian.org/ ${target_release}/updates main contrib non-free" >>"${target_dir}/etc/apt/sources.list" else # Bullseye+: deb822 format if echo "${target_release}" | grep -q "^\(bullseye\)$"; then debian_components="main contrib non-free" else debian_components="main contrib non-free non-free-firmware" fi : >"${target_dir}/etc/apt/sources.list" cat >"${target_dir}/etc/apt/sources.list.d/debian.sources" <"${target_dir}/etc/apt/sources.list.d/mx.list" <"${target_dir}/etc/apt/sources.list.d/mx.sources" <