Skip to content

Commit

Permalink
profiles: Fix working with ugly mkinitcpio configurations (#85)
Browse files Browse the repository at this point in the history
* profiles: Fix working with ugly mkinitcpio configurations

* profiles: Return missing warning
  • Loading branch information
ventureoo authored Mar 8, 2024
1 parent 4c8676f commit 69f5c99
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions profiles/pci/graphic_drivers/profiles.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ conditional_packages = """
post_install = """
cat <<EOF >/etc/mkinitcpio.conf.d/10-chwd.conf
# This file is automatically generated by chwd. PLEASE DO NOT EDIT IT.
MODULES+=(nvidia nvidia_modeset nvidia_uvm nvidia_drm)
if [[ "$(declare -p MODULES)" =~ "declare -a" ]]; then
MODULES+=(nvidia nvidia_modeset nvidia_uvm nvidia_drm)
else
MODULES=($MODULES nvidia nvidia_modeset nvidia_uvm nvidia_drm)
fi
EOF
mkinitcpio -P
"""
Expand Down Expand Up @@ -74,7 +78,11 @@ conditional_packages = """
post_install = """
cat <<EOF >/etc/mkinitcpio.conf.d/10-chwd.conf
# This file is automatically generated by chwd. PLEASE DO NOT EDIT IT.
MODULES+=(nvidia nvidia_modeset nvidia_uvm nvidia_drm)
if [[ "$(declare -p MODULES)" =~ "declare -a" ]]; then
MODULES+=(nvidia nvidia_modeset nvidia_uvm nvidia_drm)
else
MODULES=($MODULES nvidia nvidia_modeset nvidia_uvm nvidia_drm)
fi
EOF
mkinitcpio -P
"""
Expand Down Expand Up @@ -155,7 +163,11 @@ post_install = """
else
cat <<EOF >/etc/mkinitcpio.conf.d/10-chwd.conf
# This file is automatically generated by chwd. PLEASE DO NOT EDIT IT.
MODULES+=(virtio virtio_blk virtio_pci virtio_net)
if [[ "$(declare -p MODULES)" =~ "declare -a" ]]; then
MODULES+=(virtio virtio_blk virtio_pci virtio_net)
else
MODULES=($MODULES virtio virtio_blk virtio_pci virtio_net)
fi
EOF
mkinitcpio -P
fi
Expand Down

0 comments on commit 69f5c99

Please sign in to comment.