ci: Fix repo editing in installdeps.sh
- Use `IFS=` so that we don't drop leading whitespace when reading in, which can be used to specify multiple baseurls on multiple lines. - Use `-r` as good practice so we don't try to interpret anything. - Use `echo "$line"` so that we don't drop leading whitespace when writing out. Closes: #1787 Approved by: cgwalters
This commit is contained in:
parent
d0fdd9ac1d
commit
d34f24581a
@ -14,7 +14,7 @@ if [ "$id" == fedora ] && [ "$version_id" == 29 ]; then
|
||||
# Until we fix https://github.com/rpm-software-management/libdnf/pull/149
|
||||
excludes='exclude=ostree ostree-libs ostree-grub2 rpm-ostree'
|
||||
for repo in /etc/yum.repos.d/fedora*.repo; do
|
||||
cat ${repo} | (while read line; do if echo "$line" | grep -qE -e '^enabled=1'; then echo "${excludes}"; fi; echo $line; done) > ${repo}.new
|
||||
cat ${repo} | (while IFS= read -r line; do if echo "$line" | grep -qE -e '^enabled=1'; then echo "${excludes}"; fi; echo "$line"; done) > ${repo}.new
|
||||
mv ${repo}.new ${repo}
|
||||
done
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user