summaryrefslogtreecommitdiff
path: root/setup-xorg-base.in
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2022-05-19 16:22:08 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2022-05-19 16:25:03 +0200
commit7ff651fd5c27fec32939c6eb3757be6dd2f54af3 (patch)
tree40a04a3bd0506aeb563ebcacb03defae710b644e /setup-xorg-base.in
parent1afa626b3bbe591a179b45527b0fb5a4ad71d788 (diff)
downloadalpine-conf-7ff651fd5c27fec32939c6eb3757be6dd2f54af3.zip
setup-xorg-base: silence errors when repositories does not exist
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" \