diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2022-05-19 16:22:08 +0200 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2022-05-19 16:25:03 +0200 |
commit | 7ff651fd5c27fec32939c6eb3757be6dd2f54af3 (patch) | |
tree | 40a04a3bd0506aeb563ebcacb03defae710b644e /setup-xorg-base.in | |
parent | 1afa626b3bbe591a179b45527b0fb5a4ad71d788 (diff) | |
download | alpine-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.in | 2 |
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" \ |