From 1f4dc0c2b6777b4af478bada8b44fb3064f33e50 Mon Sep 17 00:00:00 2001 From: Marcin Krol Date: Sat, 20 Mar 2021 18:08:24 +0100 Subject: [PATCH] - fix sed to disallow macro multiplication on multiple calls --- builder.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builder.sh b/builder.sh index 1d876e5..a091ffc 100755 --- a/builder.sh +++ b/builder.sh @@ -1757,7 +1757,7 @@ build_package() { # Enable/disable distro wide bconds based on ~/.distbcond process_distbcond "$specdir/$SPECFILE" # Add %tld macro to release to allow release control - sed -i -r -e 's/^Release:\s+(.*)$/Release:\t\1%{?tld}/' $specdir/$SPECFILE + sed -i -r -e '/^Release:/s/%\{\?tld\}//g; s/^Release:\s+(.*)$/Release:\t\1%{?tld}/;' $specdir/$SPECFILE # FIXME: eval here is exactly why? PATH=$CLEAN_PATH eval teeboth "'$logfile'" ${TIME_COMMAND} ${NICE_COMMAND} $RPMBUILD $TARGET_SWITCH $BUILD_SWITCH -v $QUIET $CLEAN $RPMOPTS $RPMBUILDOPTS $BCOND --define \'_specdir $PACKAGE_DIR\' --define \'_sourcedir $PACKAGE_DIR\' $specdir/$SPECFILE retval=$? -- 2.46.0