summaryrefslogtreecommitdiff
path: root/setup-xorg-base.in
diff options
context:
space:
mode:
Diffstat (limited to 'setup-xorg-base.in')
-rw-r--r--setup-xorg-base.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/setup-xorg-base.in b/setup-xorg-base.in
index 95752ce..78bacf8 100644
--- a/setup-xorg-base.in
+++ b/setup-xorg-base.in
@@ -24,7 +24,7 @@ done
shift $(($OPTIND - 1))
# enable community repo
-if ! grep -q '^[^#].*/community$' "$ROOT"/etc/apk/repositories; then
+if [ -f "$ROOT"/etc/apk/repositories ] && ! grep -q '^[^#].*/community$' "$ROOT"/etc/apk/repositories; then
repo=$(grep '^[^#].*/main$' /etc/apk/repositories | sed 's:/main$:/community:')
escaped_repo=$(echo $repo | sed -e 's:/:\\/:g' -e 's:\.:\\.:g')
sed -i -e "/^[^#].*\/main$/a $repo" \