From dcc2d1407855771a0ea30b6ed7f328c68f082355 Mon Sep 17 00:00:00 2001 From: teldra Date: Tue, 13 Jun 2023 08:39:02 +0200 Subject: [PATCH] main: add musl choosing --- main.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/main.sh b/main.sh index 54dd395..585e249 100755 --- a/main.sh +++ b/main.sh @@ -278,10 +278,17 @@ do_install() { for i in "${ignorepkgs[@]}"; do echo "ignorepkg=${i}" >> "${target}/etc/xbps.d/10-ignore-pkg.conf" done - if [ "${DEBUG}" -ge "1" ]; then - xbps-install -S -R https://alpha.de.repo.voidlinux.org/current -R https://rotce.de/pakete -r "${target}" "${pkgs[@]}" + xbps_a=$(uname -a) + if grep -q musl <<< $(uname -a); then + libc="x86_64-musl" else - xbps-install -S -y -R https://alpha.de.repo.voidlinux.org/current -R https://rotce.de/pakete -r "${target}" "${pkgs[@]}" + libc="x86_64" + fi + + if [ "${DEBUG}" -ge "1" ]; then + xbps-install -a "${libc}" -S -R https://alpha.de.repo.voidlinux.org/current -R https://rotce.de/pakete -r "${target}" "${pkgs[@]}" + else + xbps-install -a "${libc}" -S -y -R https://alpha.de.repo.voidlinux.org/current -R https://rotce.de/pakete -r "${target}" "${pkgs[@]}" fi }