X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=OSX%2Fupdate-info-plist.pl;h=aac1f48c860694c8fc3944ccfec86c8fe3bd6d1a;hb=c1b9b55ad8d59dc05ef55e316aebf5863e7dfa56;hp=f3ae48283dbf024f40c493e4032ba3b002296e84;hpb=49f5b54f312fe4ac2e9bc47581a72451bd0e8439;p=xscreensaver diff --git a/OSX/update-info-plist.pl b/OSX/update-info-plist.pl index f3ae4828..aac1f48c 100755 --- a/OSX/update-info-plist.pl +++ b/OSX/update-info-plist.pl @@ -1,5 +1,5 @@ #!/usr/bin/perl -w -# Copyright © 2006 Jamie Zawinski +# Copyright © 2006-2008 Jamie Zawinski # # Permission to use, copy, modify, distribute, and sell this software and its # documentation for any purpose is hereby granted without fee, provided that @@ -19,11 +19,11 @@ # Created: 8-Mar-2006. require 5; -use diagnostics; +#use diagnostics; # Fails on some MacOS 10.5 systems use strict; my $progname = $0; $progname =~ s@.*/@@g; -my $version = q{ $Revision: 1.6 $ }; $version =~ s/^[^0-9]+([0-9.]+).*$/$1/; +my $version = q{ $Revision: 1.9 $ }; $version =~ s/^[^0-9]+([0-9.]+).*$/$1/; my $verbose = 1; @@ -113,17 +113,15 @@ sub update_saver_xml($$) { } } - my $cc = "\302\251"; # unicode "©" - - my $desc1 = ("$name, version $vers.\n\n" . + my $desc1 = ("$name, version $vers.\n\n" . # savername.xml $desc . "\n" . "\n" . - "From the XScreenSaver collection:\n" . + "From the XScreenSaver collection: " . "http://www.jwz.org/xscreensaver/\n" . "Copyright \251 $year by $authors.\n"); - my $desc2 = ("$name $vers,\n" . - "$cc $year $authors.\n" . + my $desc2 = ("$name $vers,\n" . # Info.plist + "\302\251 $year $authors.\n" . "From the XScreenSaver collection:\n" . "http://www.jwz.org/xscreensaver/\n" . "\n" . @@ -216,6 +214,11 @@ sub update($) { my $copyright = "$1"; $copyright =~ s/\b\d{4}-(\d{4})\b/$1/; + # Lose the Wikipedia URLs. + $info_str =~ s@http:.*\bwikipedia\b[^\s]+[ \t]*\n?@@gm; + + $info_str =~ s/(\n\n)\n+/$1/gs; + $info_str =~ s/(^\s+|\s+$)//gs; $plist = set_plist_key ($filename, $plist, "NSHumanReadableCopyright", $copyright); $plist = set_plist_key ($filename, $plist,