diff options
-rwxr-xr-x | tools/buildzip.pl | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tools/buildzip.pl b/tools/buildzip.pl index e299d7c02a..fe0bd591e4 100755 --- a/tools/buildzip.pl +++ b/tools/buildzip.pl | |||
@@ -119,14 +119,14 @@ sub make_install { | |||
119 | $userdir .= "/share/rockbox"; | 119 | $userdir .= "/share/rockbox"; |
120 | } else { | 120 | } else { |
121 | # for non-app builds we expect the prefix to be the dir above .rockbox | 121 | # for non-app builds we expect the prefix to be the dir above .rockbox |
122 | $bindir .= "/.rockbox"; | 122 | $bindir .= "/$rbdir"; |
123 | $libdir = $userdir = $bindir; | 123 | $libdir = $userdir = $bindir; |
124 | } | 124 | } |
125 | if ($dest =~ /\/dev\/null/) { | 125 | if ($dest =~ /\/dev\/null/) { |
126 | die "ERROR: No PREFIX given\n" | 126 | die "ERROR: No PREFIX given\n" |
127 | } | 127 | } |
128 | 128 | ||
129 | if ((!$app) && $src && (abs_path($dest) eq abs_path($src))) { | 129 | if ((!$app) && $src && (abs_path($bindir) eq abs_path($src))) { |
130 | return 1; | 130 | return 1; |
131 | } | 131 | } |
132 | 132 | ||
@@ -663,12 +663,14 @@ sub runone { | |||
663 | } | 663 | } |
664 | if($target && ($target !~ /(mod|ajz|wma)\z/i)) { | 664 | if($target && ($target !~ /(mod|ajz|wma)\z/i)) { |
665 | # On some targets, the image goes into .rockbox. | 665 | # On some targets, the image goes into .rockbox. |
666 | copy("$target", "$rbdir/$target"); | 666 | copy("$target", ".rockbox/$target"); |
667 | undef $target; | 667 | undef $target; |
668 | } | 668 | } |
669 | 669 | ||
670 | if($install) { | 670 | if($install) { |
671 | make_install(".rockbox", $install) or die "MKDIRFAILED\n"; | 671 | make_install(".rockbox", $install) or die "MKDIRFAILED\n"; |
672 | rmtree(".rockbox"); | ||
673 | print "rm .rockbox\n" if $verbose; | ||
672 | } | 674 | } |
673 | else { | 675 | else { |
674 | unless (".rockbox" eq $rbdir) { | 676 | unless (".rockbox" eq $rbdir) { |
@@ -679,9 +681,9 @@ sub runone { | |||
679 | } | 681 | } |
680 | system("$ziptool $output $rbdir $target >/dev/null"); | 682 | system("$ziptool $output $rbdir $target >/dev/null"); |
681 | print "$ziptool $output $rbdir $target >/dev/null\n" if $verbose; | 683 | print "$ziptool $output $rbdir $target >/dev/null\n" if $verbose; |
684 | rmtree("$rbdir"); | ||
685 | print "rm $rbdir\n" if $verbose; | ||
682 | } | 686 | } |
683 | rmtree(".rockbox"); | ||
684 | print "rm .rockbox\n" if $verbose; | ||
685 | }; | 687 | }; |
686 | 688 | ||
687 | if(!$exe) { | 689 | if(!$exe) { |