summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2010-07-07 20:31:34 +0000
committerRafaël Carré <rafael.carre@gmail.com>2010-07-07 20:31:34 +0000
commit80fa0efd1fb775b396652a1a9c3308d6cbfcc8f3 (patch)
tree163896dd2da532bc600a9e425e271aa237aa0175 /tools
parentf984a65554715e1f1037050402b3611938d63fd8 (diff)
downloadrockbox-80fa0efd1fb775b396652a1a9c3308d6cbfcc8f3.tar.gz
rockbox-80fa0efd1fb775b396652a1a9c3308d6cbfcc8f3.tar.bz2
rockbox-80fa0efd1fb775b396652a1a9c3308d6cbfcc8f3.zip
buildzip.pl: more fixes
- cygwin's abs_path() can't operate on non existing path, so only evaluate abs_path("$install/something") if $install is set. (apply r27137 again) - don't set $install to 0 since it's meant to be a string - create the install prefix with mkdir -p before installing git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27341 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'tools')
-rwxr-xr-xtools/buildzip.pl11
1 files changed, 7 insertions, 4 deletions
diff --git a/tools/buildzip.pl b/tools/buildzip.pl
index 71c256890b..5d8fa43dfa 100755
--- a/tools/buildzip.pl
+++ b/tools/buildzip.pl
@@ -21,7 +21,7 @@ my $ROOT="..";
my $ziptool="zip -r9";
my $output="rockbox.zip";
my $verbose;
-my $install=0;
+my $install;
my $exe;
my $target;
my $modelname;
@@ -475,8 +475,6 @@ $year+=1900;
sub runone {
my ($target, $fonts)=@_;
- my $samedir = abs_path("$install/$rbdir") eq abs_path($rbdir);
-
# build a full install .rockbox ($rbdir) directory
buildzip($target, $fonts);
@@ -496,12 +494,17 @@ sub runone {
print "$ziptool $output $rbdir $target >/dev/null\n";
}
+ my $samedir = 0; # is the destination dir equal to source dir ?
+
if($install) {
if ($install =~ /\/dev\/null/) {
die "ERROR: No PREFIX given\n"
}
+
+ $samedir = abs_path("$install/$rbdir") eq abs_path($rbdir);
+
if (!$samedir) {
- system("cp -r $rbdir \"$install\" >/dev/null");
+ system("mkdir -p \"$install\" && cp -r $rbdir \"$install/\"");
}
}
else {