[packages/adapter: 293/631] - kill tabs of sorted preamble tags

glen glen at pld-linux.org
Mon Sep 12 19:59:01 CEST 2016


commit 4932d2c694578cf951b488d03f432add64ca6ac5
Author: Elan Ruusamäe <glen at pld-linux.org>
Date:   Tue Feb 28 22:42:23 2006 +0000

    - kill tabs of sorted preamble tags
    
    Changed files:
        adapter.awk -> 1.283

 adapter.awk | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/adapter.awk b/adapter.awk
index 4c2ce77..546cabd 100644
--- a/adapter.awk
+++ b/adapter.awk
@@ -644,8 +644,9 @@ preamble == 1 {
 		$0 = $1 "%{tmpdir}/%{name}-%{version}-root-%(id -u -n)"
 
 	# Use "License" instead of "Copyright" if it is (L)GPL or BSD
-	if (field ~ /copyright:/ && $2 ~ /GPL|BSD/)
+	if (field ~ /copyright:/ && $2 ~ /GPL|BSD/) {
 		$1 = "License:"
+	}
 
 	if (field ~ /name:/) {
 		if ($2 == "%{name}" && name) {
@@ -803,7 +804,9 @@ preamble == 1 {
 	if (b_idx > 0) {
 		isort(b_key, b_idx);
 		for (i = 1; i <= b_idx; i++) {
-			print "" b_val[b_key[i]];
+			v = b_val[b_key[i]];
+			sub(/[ \t]+$/, "", v);
+			print "" v;
 		}
 		b_idx = 0
 	}
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/adapter.git/commitdiff/6ca0126d4d0c8c79feb7db10b0a0fade0f3b8885



More information about the pld-cvs-commit mailing list