mirror of
https://codeberg.org/privacy1st/arch
synced 2024-12-24 01:16:05 +01:00
24 lines
540 B
Bash
24 lines
540 B
Bash
#!/bin/sh
|
|
# stdin: default config
|
|
# stdout: modified config
|
|
set -e
|
|
|
|
# save stdin in variable
|
|
stdin="$(cat)"
|
|
|
|
# Enable parallel downloads
|
|
echo "$stdin" | sed 's|^#ParallelDownloads\s*=.*$|ParallelDownloads = 4|'
|
|
|
|
# Assert multilib is not enabled
|
|
! echo "$stdin" | grep --quiet '^\[multilib\].*$'
|
|
|
|
# Enable multilib repository
|
|
printf '\n[multilib]\nInclude = /etc/pacman.d/mirrorlist\n'
|
|
|
|
# Assert de-p1st is not enabled
|
|
! echo "$stdin" | grep --quiet '^\[de-p1st\].*$'
|
|
|
|
# de-p1st mirror
|
|
printf '\n'
|
|
printf 'Include = /etc/pacman.d/de-p1st\n'
|