[PATCH 1/2] Use include include statement

Sérgio M. Basto sergio at serjux.com
Thu Nov 10 06:40:28 CET 2016


add template_init, more info of include here:
https://bugzilla.redhat.com/show_bug.cgi?id=1272381

Signed-off-by: Sérgio M. Basto <sergio at serjux.com>
---
 el-round.sh   | 4 ++--
 round.sh      | 4 ++--
 template_init | 3 +++
 3 files changed, 7 insertions(+), 4 deletions(-)
 create mode 100644 template_init

diff --git a/el-round.sh b/el-round.sh
index c56d331..d3d85d1 100755
--- a/el-round.sh
+++ b/el-round.sh
@@ -24,8 +24,8 @@ for arch in $ARCHES ; do
     rm -f fedora-${fver}-${arch}-${repo}.cfg
     continue
   fi
-  cp ${etc_mock}/epel-${fver}-${arch}.cfg epel-${fver}-${arch}-${repo}.cfg
-  sed -i -e "s|^\"\"\"||g" epel-${fver}-${arch}-${repo}.cfg
+  cp template_init epel-${fver}-${arch}-${repo}.cfg
+  sed -i -e "s|configuration_name|fedora-${fver}-${arch}.cfg|g" epel-${fver}-${arch}-${repo}.cfg
   cat rpmfusion-free-$flavour-template >> epel-${fver}-${arch}-${repo}.cfg
   if [ ! "$repo" = rpmfusion_free ] ; then
     cat rpmfusion-nonfree-$flavour-template >> epel-${fver}-${arch}-${repo}.cfg
diff --git a/round.sh b/round.sh
index 73e9d73..39a628e 100755
--- a/round.sh
+++ b/round.sh
@@ -31,8 +31,8 @@ for arch in $ARCHES ; do
     rm -f fedora-${fver}-${arch}-${repo}.cfg
     continue
   fi
-  cp ${etc_mock}/fedora-${fver}-${arch}.cfg fedora-${fver}-${arch}-${repo}.cfg
-  sed -i -e "s|^\"\"\"||g" fedora-${fver}-${arch}-${repo}.cfg
+  cp template_init fedora-${fver}-${arch}-${repo}.cfg
+  sed -i -e "s|configuration_name|fedora-${fver}-${arch}.cfg|g" fedora-${fver}-${arch}-${repo}.cfg
   cat rpmfusion-free-$flavour-template >> fedora-${fver}-${arch}-${repo}.cfg
   if [ ! "$repo" = rpmfusion_free ] ; then
     cat rpmfusion-nonfree-$flavour-template >> fedora-${fver}-${arch}-${repo}.cfg
diff --git a/template_init b/template_init
new file mode 100644
index 0000000..ad47018
--- /dev/null
+++ b/template_init
@@ -0,0 +1,3 @@
+include('/etc/mock/configuration_name')
+
+config_opts['yum.conf'] += """
-- 
2.5.5


More information about the rpmfusion-developers mailing list