mumble/scripts/mklic.pl
Thorvald Natvig f21fdf789f Let's try licenses again...
git-svn-id: https://mumble.svn.sourceforge.net/svnroot/mumble/trunk@20 05730e5d-ab1b-0410-a4ac-84af385074fa
2005-09-02 16:57:44 +00:00

31 lines
533 B
Perl

#! /usr/bin/perl
use warnings;
use strict;
use Carp;
sub spitout($$) {
my ($var,$file)=@_;
my $ret;
open(IN, $file) or croak;
my $l = join("", <IN>);
$l =~ s/\r//g;
$l =~ s/\n/\\n/g;
$l =~ s/\"/\\\"/g;
return qq!static const char *${var} = \"! . $l . "\";\n\n\n";
}
open(F, "> ../licenses.h");
print F spitout("licenseGPL", "../LICENSE.GPL");
print F spitout("licenseSpeex", "../LICENSE.SPEEX");
print F spitout("licenseMumble", "../LICENSE");
print F spitout("licenseUPX", "../LICENSE.UPX");
close(F);