From b43557394f57a683ad38e17c56e9ec1b35cd51fe Mon Sep 17 00:00:00 2001 From: Bhanu Prasad G Date: Wed, 19 Dec 2018 21:33:18 -0600 Subject: [PATCH] add global replace for sed --- metadata.json | 2 +- templates/update-repos.sh.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/metadata.json b/metadata.json index 1f4996e..2c1b870 100644 --- a/metadata.json +++ b/metadata.json @@ -1,6 +1,6 @@ { "name": "bp85-mirror_repos", - "version": "0.1.3", + "version": "0.1.4", "author": "bp85", "summary": "Mirror yum repositories to local + and create yum repos from those", "license": "Apache-2.0", diff --git a/templates/update-repos.sh.erb b/templates/update-repos.sh.erb index 80080f1..5fe4114 100644 --- a/templates/update-repos.sh.erb +++ b/templates/update-repos.sh.erb @@ -106,7 +106,7 @@ for OS in ${OSES[@]}; do [ $REPOS ] && REPOS_<%= os.split('-').join('_') %>=( $(echo "$REPOS" |sed 's/,/ /g') ) [ ${REPOS_<%= os.split('-').join('_') %>} ] || REPOS_<%= os.split('-').join('_') %>=( <%= scope.lookupvar('mirror_repos::repos')[os].keys.join(" ") %> ) <% end -%> - OS=$(echo $OS | sed 's/-/_/') + OS=$(echo $OS | sed 's/-/_/g') #now define a new array, because substrings won't perform well in for loop REPOS_OS=$(eval echo \${REPOS_${OS}[*]}) if [ ${VERBOSE} == 'False' ]; then