From 2f3487679010ec0ca1e4d91896483e7e171711cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= Date: Fri, 6 Aug 2021 10:35:05 +0200 Subject: [PATCH] Use the opensuse template on all openSUSE variants At the moment you have to manually specify the template file name on Leap, as gem2rpm tries to use the opensuse-leap template on Leap, which does not exist. Therefore we fallback to the opensuse template instead. --- bin/gem2rpm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/gem2rpm b/bin/gem2rpm index 1298798..3b9a836 100755 --- a/bin/gem2rpm +++ b/bin/gem2rpm @@ -82,8 +82,8 @@ if template_file.nil? f.close f = nil end - if template_file.eql? '"opensuse-tumbleweed"' - $stderr.puts 'Using template opensuse on Tumbleweed' + if template_file.match? '^"opensuse' + $stderr.puts 'Using template opensuse on openSUSE variant' template_file = 'opensuse' end end