Skip to content

PList Creation Script

Jeremy McDermond edited this page Mar 8, 2017 · 1 revision

This is the script used to generate the plists in Buster:

#!/usr/bin/perl

print "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
print "<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n";
print "<plist version=\"1.0\">\n";
print "<dict>\n";

while(<STDIN>) {
    chomp;
    my ($reflector, $address) = split('\t');
    chomp $reflector, $address;
    $reflector =~ s/^\s+|\s+$//g;
    $address =~ s/^\s+|\s+$//g;
    print "\t<key>$reflector</key>\n";
    print "\t<string>$address</string>\n";
}

print "</dict>\n";
print "</plist>\n";
Clone this wiki locally