Commit 4e87fc76 authored by Jakub Jirutka's avatar Jakub Jirutka

travis: fix set_repositories_for(), needs sudo

parent 5840a481
......@@ -38,15 +38,15 @@ changed_abuilds() {
# $1: the target repository; main, community, or testing
set_repositories_for() {
local target_repo="$1"
local repos_file='/etc/apk/repositories'
local repos=''
printf '' > $repos_file
local repo; for repo in main community testing; do
printf '%s\n' "$MIRROR_URI/$repo" >> $repos_file
repos="$repos $MIRROR_URI/$repo"
[ "$repo" = "$target_repo" ] && break
apk update
sudo printf '%s\n' $repos > /etc/apk/repositories
sudo apk update
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment