main: add musl choosing

This commit is contained in:
teldra 2023-06-13 08:39:02 +02:00
parent e9902f5300
commit dcc2d14078
1 changed files with 10 additions and 3 deletions

13
main.sh
View File

@ -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
}