vp-build/common/travis/set_mirror.sh

16 lines
494 B
Bash
Raw Permalink Normal View History

#!/bin/sh
2018-09-02 11:53:41 -07:00
TRAVIS_PROTO=http
2021-10-03 17:14:53 -05:00
TRAVIS_MIRROR=repo-us.voidlinux.org
for _i in etc/xbps.d/repos-remote*.conf ; do
/bin/echo -e "\x1b[32mUpdating $_i...\x1b[0m"
# First fix the proto, ideally we'd serve everything with HTTPS,
# but key management and rotation is a pain, and things are signed
# so we can afford to be a little lazy at times.
sed -i "s:https:$TRAVIS_PROTO:g" $_i
2018-09-02 11:36:22 -07:00
# Now set the mirror
2018-09-02 11:53:41 -07:00
sed -i "s:alpha\.de\.repo\.voidlinux\.org:$TRAVIS_MIRROR:g" $_i
done