cookutils diff fix-desktop-file @ rev 1141

modules/pack: take care of stuff update dates
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Jul 14 11:52:54 2019 +0200 (2019-07-14)
parents 5afd5252a5e7
children
line diff
     1.1 --- a/fix-desktop-file	Sat Nov 07 16:00:41 2015 +0200
     1.2 +++ b/fix-desktop-file	Sun Jul 14 11:52:54 2019 +0200
     1.3 @@ -74,12 +74,6 @@
     1.4  		if (Name) next;  # Name already printed
     1.5  		Name = gensub(/^[^=]+=[[:space:]]*/, "", "");
     1.6  		print;
     1.7 -		for (i in name) {
     1.8 -			if (name[i] &&
     1.9 -			    name[i] != Name) {  # skip redundant
    1.10 -				printf "Name[%s]=%s\n", i, name[i];
    1.11 -			}
    1.12 -		}
    1.13  		next;
    1.14  	}
    1.15  
    1.16 @@ -91,12 +85,8 @@
    1.17  		name[locale] = value;
    1.18  		if (Name &&
    1.19  		    Name != value) {  # skip redundant
    1.20 -			name[locale] = value;
    1.21  			print;
    1.22  		}
    1.23 -		if (comment[locale] &&  # print pending Comment[xx]
    1.24 -		    tolower(comment[locale]) != tolower(name[locale]))
    1.25 -			printf "Comment[%s]=%s\n", locale, comment[locale];
    1.26  		next;
    1.27  	}
    1.28  
    1.29 @@ -109,13 +99,6 @@
    1.30  		} else {
    1.31  			print;
    1.32  		}
    1.33 -		for (i in comment) {
    1.34 -			if (comment[i] &&
    1.35 -			    tolower(comment[i]) != tolower(Comment) &&
    1.36 -			    tolower(comment[i]) != tolower(name[i])) {  # skip redundant
    1.37 -				printf "Comment[%s]=%s\n", i, comment[i];
    1.38 -			}
    1.39 -		}
    1.40  		next;
    1.41  	}
    1.42  
    1.43 @@ -125,9 +108,7 @@
    1.44  		locomm = gensub(/^[^=]*=[[:space:]]*(.*)$/, "\\1", "");
    1.45  		if (comment[locale]) next;  # Comment[locale] already printed
    1.46  		comment[locale] = locomm;
    1.47 -		if (Comment &&  # pending until Comment appear
    1.48 -		    name[locale] &&  # pending until Name[xx] appear
    1.49 -		    tolower(locomm) != tolower(Comment) &&
    1.50 +		if (tolower(locomm) != tolower(Comment) &&
    1.51  		    tolower(locomm) != tolower(name[locale])) {  # skip redundant
    1.52  			comment[locale] = locomm;
    1.53  			print;