[MPlayer-cvslog] CVS: main configure,1.1055,1.1056

Oded Shimon ods15 at ods15.dyndns.org
Sun Sep 11 20:09:19 CEST 2005


On Sat, Sep 10, 2005 at 08:44:20PM +0200, Nicolas Plourde CVS wrote:
> +cat > $TMPP <<EOF
> +\$/ = \0;
> +
> +open( PLIST, "/System/Library/CoreServices/SystemVersion.plist") || do {
> +	print "Failed to open SystemVersion.plist\n";
> +	exit (1);
> +};
> +
> +\$plistData = <PLIST>;
> +\$plistData =~ /<dict>(.*?)<\/dict>/gis;
> + at items = split(/<key>/, \$plistData);
> +
> +shift @items;
> +foreach \$item (@items) {
> +	\$item =~ /(.*?)<\/key>.*?<string>(.*?)<\/string>/gis;
> +        \$versiondata{ \$1 } = \$2;
> +}
> +
> +close(PLIST);
> +
> +if( \$versiondata{"ProductName"} eq  "Mac OS X") {
> +	exit(0);
> +}
> +
> +exit(1);
> +EOF

I didn't read this very thoroughly, and although it's not as good, wouldn't

grep "Mac OS X" /System/Library/CoreServices/SystemVersion.plist

be good enough?

- ods15




More information about the MPlayer-cvslog mailing list