repository for casafeather app
Source
open my $fileHandle, ">>", "$app_path/Contents/Resources/qt.conf" or die "Can't open '$app_path/Contents/Resources/qt.conf'\n";
#!/usr/bin/perl
use :: ;
use :: ;
use :: ;
use qw(strftime);
%subst = ( );
@subst_files = ( "private/casafeathertool.py" );
sub {
my $root = shift(@_);
for $f ( @subst_files ) {
my $path = "$root/$f";
open( , "< $path");
@dest = <>;
close( );
open( , "> $path");
foreach ( @dest ) {
foreach $k ( keys %subst ) {
$k|$subst{$k}|; |
print $_;
}
}
close( );
}
}
sub {
my ($from, $to) = @_;
my $cmd;
if ( - $from || (- $from && $from =~ |/$|) ) {
$cmd = "rsync -aq $from $to";
} else {
$cmd = "rsync -aq $from/ $to";
}
print("\t$cmd\n");
open( , "$cmd 2>&1 |" );
for ( <> ) { print "\t>\t$_" }
close( );
}
sub {
my $path = shift(@_);
my $name = ($path);
my $dir = ($path);
if ( ! - $path ) { die "protobuf spec, '$name', is not a file" }
return ( $dir, $name );
}
$prefix = "";
$app_path = "";
$build_number = "";
foreach ( @ARGV ) {
^ =$| && ( next ); |
^=(.*)| && ( $prefix = $1, next ); |
^=(.*)| && ( $app_path = $1, next ); |
^=(\ +.\ +.\+)$| && ( $build_number = $1, next ); |
if ( |^ =| ) { die "build number must be a number" }
die "unknown option: $_";
}
if ( ! $prefix ) { die "no prefix specified" };
if ( ! - $prefix) { ($prefix) }