Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Use logGen for re-packaging OS X installers' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Use logGen for re-packaging OS X installers
Authored by: ljhilliii on Oct 22, '04 12:01:31PM

my first venture into Perl.. Here it goes... this will read in your change file and then create a script.. to move all the noted files/directories.

(Note you will want to change the destination directory... )

#!/usr/bin/perl -w
use strict;

print " What is the name of the Change file \n";
my $changefile =<>;
chomp $changefile;
open(INFO, $changefile) || die "could not open '$changefile' $!";
open(OUT, "> output.txt") || die "could not open output";

my @lines = <INFO>;

close(INFO);

print " What is the name of the program you are packaging? ";

my $appname = <>;
chomp $appname;

foreach my $line (@lines) {
chomp $line;
if (-r $line) {
print OUT "ditto -V --rsrc '$line' '/Users/lhill/packages/$appname/source$line'\n";
print "ditto -V --rsrc '$line' '/Users/lhill/packages/$appname/source$line'\n";
}

}
close(OUT)



[ Reply to This | # ]