Created: [object.createdAt] Last modified on: [object.updatedAt]
)
},
);
my $LOCALIZABLE_FILE = 'Contents/Resources/English.lproj/Localizable.strings';
my $LOCALIZABLE_STRINGS = q("wallet.computer.LoginInformation" = "Login Information";
"wallet.computer.LoginInformation.desc" = "Generic login information.";
"wallet.computer.LoginInformation.hostname" = "Hostname";
"wallet.computer.LoginInformation.service" = "Service";
"wallet.computer.LoginInformation.username" = "Username";
"wallet.computer.LoginInformation.password" = "Password";
);
# Quit 1password
print "Quitting 1Password...\n";
system(q(osascript -e 'tell application "1Password" to quit' >/dev/null 2>&1));
# Make a backup of the application
print "Making a backup of the application...\n";
system("rm -rf $APP$BAKEXT");
if (system("cp -Rp $APP $APP$BAKEXT") != 0) {
die "Something happened while making a copy of the application - aborting for safety\n";
}
# Add the new files
for my $file (@FILES) {
my $fname=$file->{File};
my $content=$file->{Content};
print "Writing $fname...\n";
my $file="$APP/$fname";
if (-f $file) {
die " $fname already exists - aborting\n";
}
open F, ">$file" or die "Error opening $file for writing\n";
print F $content;
close F or die "Error closing $file\n";
}
# Add the localizable strings
print "Adding strings to Localizable.strings...\n";
my $file="$APP/$LOCALIZABLE_FILE";
#open F, ">>$file" or die "Error opening $file for append\n";
# Modification for UTF16 contributed by Damon Cortesi (http://dcortesi.com/)
open F, ">>:raw:perlio:encoding(utf16be)", $file or die "Error opening $file for append\n";
print F $LOCALIZABLE_STRINGS;
close F or die "Error closing $file\n";
print "Done\n";