diskimage-builder/elements/fedora/pre-install.d/01-set-fedora-mirror
Ben Nemec 79464cf00f Set -o pipefail new scripts
A few scripts were added without set -o pipefail since the original
change to add that everywhere.  This will get the dib-lint check
passing again.

Change-Id: I96bef45cc10ff9bbcf2c4f1b796b8cd188e10485
2014-05-23 15:57:27 -05:00

13 lines
406 B
Bash
Executable File

#!/bin/bash
set -eu
set -o pipefail
DIB_DISTRIBUTION_MIRROR=${DIB_DISTRIBUTION_MIRROR:-}
[ -n "$DIB_DISTRIBUTION_MIRROR" ] || exit 0
for FILE in /etc/yum.repos.d/fedora.repo /etc/yum.repos.d/fedora-updates.repo /etc/yum.repos.d/fedora-updates-testing.repo; do
sudo sed -e "s|^#baseurl=http://download.fedoraproject.org/pub/fedora/linux|baseurl=$DIB_DISTRIBUTION_MIRROR|;/^metalink/d" -i $FILE
done