diff options
Diffstat (limited to 'setup-xorg-base.in')
-rw-r--r-- | setup-xorg-base.in | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/setup-xorg-base.in b/setup-xorg-base.in index 78bacf8..1a7d7b3 100644 --- a/setup-xorg-base.in +++ b/setup-xorg-base.in @@ -23,6 +23,24 @@ while getopts "d:n:h" opt; do done shift $(($OPTIND - 1)) +# For every main/ repo, enable corresponding community/ repo +orig="$ROOT"/etc/apk/repositories +if test -f "$orig"; then + echo '>> Enabling community repositories' + tmp="$orig".tmp:setup-xorg-base + :> "$tmp" + while read line ; do + echo "$line" + nosharp="${line##\#*}" + nomain="${line%%/main}" + if test "$line" = "$nosharp" && test "$line" != "$nomain"; then + echo "$nomain"/community + fi + done < "$orig" >> "$tmp" + mv -f "$tmp" "$orig" + $MOCK apk update +fi + # enable community repo if [ -f "$ROOT"/etc/apk/repositories ] && ! grep -q '^[^#].*/community$' "$ROOT"/etc/apk/repositories; then repo=$(grep '^[^#].*/main$' /etc/apk/repositories | sed 's:/main$:/community:') |