Skip to content
Snippets Groups Projects
Commit 4e87fc76 authored by Jakub Jirutka's avatar Jakub Jirutka :flag_ua:
Browse files

travis: fix set_repositories_for(), needs sudo

parent 5840a481
No related branches found
No related tags found
No related merge requests found
...@@ -38,15 +38,15 @@ changed_abuilds() { ...@@ -38,15 +38,15 @@ changed_abuilds() {
# $1: the target repository; main, community, or testing # $1: the target repository; main, community, or testing
set_repositories_for() { set_repositories_for() {
local target_repo="$1" local target_repo="$1"
local repos_file='/etc/apk/repositories' local repos=''
printf '' > $repos_file
local repo; for repo in main community testing; do 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 [ "$repo" = "$target_repo" ] && break
done done
apk update sudo printf '%s\n' $repos > /etc/apk/repositories
sudo apk update
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment