[packages/rpm-build-tools] rewrite builder -5 in sed dropping perl dependency
atler
atler at pld-linux.org
Mon Jun 12 00:09:25 CEST 2023
commit 2b0d5d8f830060ed68ecff39f3973c3fd7ce2894
Author: Jan Palus <atler at pld-linux.org>
Date: Mon Jun 12 00:07:26 2023 +0200
rewrite builder -5 in sed dropping perl dependency
builder.sh | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/builder.sh b/builder.sh
index 68bb875..2e8cc4a 100755
--- a/builder.sh
+++ b/builder.sh
@@ -1290,11 +1290,11 @@ update_md5() {
fi
md5=$(md5sum "$fp" | cut -f1 -d' ')
echo "Updating $srcno ($md5: $fp)."
- perl -i -ne '
- print unless (/^\s*#\s*(No)?'$srcno'-md5\s*:/i or /^\s*BuildRequires:\s*digest\(%SOURCE'$srcno'\)/i);
- print "'"$tag$md5"'\n" if /^'$srcno'\s*:\s+/i;
- ' \
- $PACKAGE_DIR/$SPECFILE
+ sed -i \
+ -e '/^\(\s*#\s*\(No\)\?'$srcno'-md5\s*:\|\s*BuildRequires:\s*digest(%SOURCE'$srcno')\)/Id' \
+ -e '/^'$srcno'\s*:\s\+/Ia \
+'"$tag$md5" \
+ $PACKAGE_DIR/$SPECFILE
fi
done
}
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/rpm-build-tools.git/commitdiff/2b0d5d8f830060ed68ecff39f3973c3fd7ce2894
More information about the pld-cvs-commit
mailing list