arch/pkg/de-p1st-pacman/pacman.conf.holoscript

24 lines
540 B
Plaintext
Raw Permalink Normal View History

#!/bin/sh
# stdin: default config
# stdout: modified config
2021-09-10 15:59:33 +02:00
set -e
# save stdin in variable
2021-09-10 15:59:33 +02:00
stdin="$(cat)"
# Enable parallel downloads
2021-09-10 15:59:33 +02:00
echo "$stdin" | sed 's|^#ParallelDownloads\s*=.*$|ParallelDownloads = 4|'
# 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'
# Assert de-p1st is not enabled
! echo "$stdin" | grep --quiet '^\[de-p1st\].*$'
# de-p1st mirror
2021-09-10 16:02:25 +02:00
printf '\n'
printf 'Include = /etc/pacman.d/de-p1st\n'