2021-04-22 13:24:47 +02:00
|
|
|
#!/bin/sh
|
|
|
|
# stdin: default config
|
|
|
|
# stdout: modified config
|
2021-09-10 15:59:33 +02:00
|
|
|
set -e
|
|
|
|
|
|
|
|
# save stdin (content of /etc/mkinitcpio.conf) in variable
|
|
|
|
stdin="$(cat)"
|
2021-06-18 19:32:30 +02:00
|
|
|
|
|
|
|
# Enable parallel downloads
|
2021-09-10 15:59:33 +02:00
|
|
|
echo "$stdin" | sed 's|^#ParallelDownloads\s*=.*$|ParallelDownloads = 4|'
|
|
|
|
|
2021-09-10 15:53:53 +02:00
|
|
|
# Assert multilib is not enabled
|
|
|
|
! echo "$stdin" | grep --quiet '^\[multilib\].*$'
|
|
|
|
|
|
|
|
# Enable multilib repository
|
2021-09-10 16:02:25 +02:00
|
|
|
printf '\n[multilib]\nInclude = /etc/pacman.d/mirrorlist\n'
|
2021-09-10 15:53:53 +02:00
|
|
|
|
2021-09-10 16:02:25 +02:00
|
|
|
# de-p1st and home_ungoogled_chromium_Arch mirror
|
|
|
|
printf '\n'
|
2021-09-10 15:53:53 +02:00
|
|
|
printf 'Include = /etc/pacman.d/de-p1st\n'
|
|
|
|
printf 'Include = /etc/pacman.d/ungoogled-chromium\n'
|