[scripts] rewrite garr mirror sed filtering trick

This commit is contained in:
Fabio Erculiani
2013-03-19 08:35:33 +00:00
parent 22ee044dc0
commit 3ff71cab55
2 changed files with 6 additions and 8 deletions

View File

@@ -24,13 +24,12 @@ if [ "${updated}" = "0" ]; then
fi
# disable all mirrors but GARR
for repo_conf in /etc/entropy/repositories.conf /etc/entropy/repositories.conf.d/entropy_*; do
for repo_conf in /etc/entropy/repositories.conf.d/entropy_*; do
# skip .example files
if [[ "${repo_conf}" =~ .*\.example$ ]]; then
echo "skipping ${repo_conf}"
continue
fi
sed -n -e "/pkg.sabayon.org/p" -e "/garr.it/p" -e "/^branch/p" \
-e "/^product/p" -e "/^official-repository-id/p" -e "/^differential-update/p" \
-i "${repo_conf}"
sed -n -e "/^pkg = .*pkg.sabayon.org/p" -e "/^repo = .*pkg.sabayon.org/p" \
-e "/garr.it/p" -e "/^\[.*\]$/p" -i "${repo_conf}"
done